Files
cariflex/tools/EVerest-main/.github/workflows/job_ocpp-tests.yml
Eric F d398a6ced2 Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter
- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
2026-06-08 00:38:27 -04:00

116 lines
3.9 KiB
YAML

name: OCPP Tests
on:
workflow_call:
inputs:
runner:
description: 'Which runner to use'
required: false
default: 'ubuntu-24.04'
type: string
dist_artifact_name:
description: 'The name of the dist artifact to download'
required: true
type: string
wheels_artifact_name:
description: 'The name of the wheels artifact to download'
required: true
type: string
build_kit_artifact_name:
description: 'The name of the build-kit artifact to download'
required: true
type: string
build_kit_image_tag:
description: 'The tag of the build-kit image to use for building the project'
required: true
type: string
build_kit_scripts_directory:
description: 'Directory in the repository where the build kit scripts are located'
required: false
default: '.ci/build-kit/scripts'
type: string
outputs:
ocpp_tests_artifact_name:
description: 'The name of the OCPP tests artifact'
value: ${{ jobs.ocpp-tests.outputs.ocpp_tests_artifact_name }}
jobs:
ocpp-tests:
name: Run OCPP Tests
runs-on: ${{ inputs.runner }}
env:
OCPP_TESTS_ARTIFACT_NAME: ocpp-tests-artifacts
outputs:
ocpp_tests_artifact_name: ${{ env.OCPP_TESTS_ARTIFACT_NAME }}
steps:
- name: Download dist dir
uses: actions/download-artifact@v4.1.8
with:
name: ${{ inputs.dist_artifact_name }}
- name: Extract dist.tar.gz
run: |
tar -xzf ${{ github.workspace }}/dist.tar.gz -C ${{ github.workspace }}
- name: Download wheels
uses: actions/download-artifact@v4.1.8
with:
name: ${{ inputs.wheels_artifact_name }}
path: wheels
- name: Checkout repository
uses: actions/checkout@v4.2.2
with:
path: source
- name: Setup run scripts
run: |
mkdir scripts
rsync -a source/${{ inputs.build_kit_scripts_directory }}/ scripts
- name: Download build-kit image
uses: actions/download-artifact@v4
with:
name: ${{ inputs.build_kit_artifact_name }}
- name: Load build-kit image
run: |
docker load -i build-kit.tar
docker image tag ${{ inputs.build_kit_image_tag }} build-kit
- name: Create integration-image
run: |
docker run \
--volume "${{ github.workspace }}:/ext" \
--name integration-container \
build-kit run-script create_ocpp_tests_image
docker commit integration-container integration-image
- name: Run OCPP tests
id: run_ocpp_tests
continue-on-error: true
run: |
docker compose \
-f source/.ci/e2e/docker-compose.yaml \
run \
e2e-test-server \
tests/run-tests.sh ocpp \
--everest-prefix /ext/dist \
--junitxml /ext/ocpp-tests-result.xml \
--html /ext/ocpp-tests-report.html
- name: Upload result and report as artifact
continue-on-error: true
if: ${{ steps.run_ocpp_tests.outcome == 'success' || steps.run_ocpp_tests.outcome == 'failure' }}
uses: actions/upload-artifact@v4.4.3
with:
if-no-files-found: error
name: ${{ env.OCPP_TESTS_ARTIFACT_NAME }}
path: |
ocpp-tests-result.xml
ocpp-tests-report.html
- name: Render OCPP tests result
if: ${{ steps.run_ocpp_tests.outcome == 'success' || steps.run_ocpp_tests.outcome == 'failure' }}
uses: pmeier/pytest-results-action@v0.7.1
with:
path: ocpp-tests-result.xml
summary: True
display-options: fEX
fail-on-empty: True
title: Test results
- name: Check if OCPP tests failed
if: ${{ steps.run_ocpp_tests.outcome == 'failure' }}
run: exit 1