-
Notifications
You must be signed in to change notification settings - Fork 77
107 lines (106 loc) · 3.46 KB
/
ocpp_tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: OCPP Tests
on:
pull_request: {}
workflow_run:
workflows: ["Build, Lint and Test"]
types: [completed]
workflow_dispatch:
inputs:
runner:
description: Which runner to use
type: choice
default: 'ubuntu-22.04'
required: true
options:
- 'ubuntu-22.04'
- 'large-ubuntu-22.04-xxl'
schedule:
- cron: '37 13,1 * * *'
jobs:
ocpp-tests:
name: OCPP Tests
env:
BUILD_KIT_IMAGE: ${{ needs.build-the-build-kit.outputs.build_kit_image_tag }}
runs-on: ${{ inputs.runner }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download dist dir
uses: actions/[email protected]
with:
name: dist
- name: Extract dist.tar.gz
run: |
tar -xzf ${{ github.workspace }}/dist.tar.gz -C ${{ github.workspace }}
- name: Download wheels
if: ${{ inputs.run_install_wheels == 'true' }}
uses: actions/[email protected]
with:
name: wheels
path: wheels
- name: Checkout repository
uses: actions/[email protected]
with:
path: source
# - name: Setup run scripts
# run: |
# mkdir scripts
# rsync -a source/${{ inputs.build_kit_scripts_directory }}/ scripts
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.BUILD_KIT_IMAGE_NAME }}
- name: Set output tag
id: buildkit_tag
shell: python3 {0}
run: |
import os
tags = "${{ steps.meta.outputs.tags }}".split(",")
if len(tags) == 0:
print("No tags found!❌")
exit(1)
tag = tags[0]
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"tag={tag}\n")
print(f"Set tag={tag}")
- name: Download build-kit image
uses: actions/download-artifact@v4
with:
name: build-kit
- name: Load build-kit image
run: |
docker load -i build-kit.tar
docker image tag ${{ steps.buildkit_tag.outputs.out }} build-kit
- name: Create integration-image
run: |
docker run \
--volume "${{ github.workspace }}:/ext" \
--name integration-container \
build-kit run-script create_integration_image
docker commit integration-container integration-image
- name: Run OCPP tests
id: run_ocpp_tests
run: |
docker compose \
-f source/.ci/e2e/docker-compose.yaml \
run \
e2e-test-server \
run-script run_ocpp_tests
# - name: Upload result and report as artifact
# if: ${{ steps.run_integration_tests.outcome == 'success' || steps.run_integration_tests.outcome == 'failure' }}
# uses: actions/[email protected]
# with:
# if-no-files-found: error
# name: integration-test-report
# path: |
# ${{ inputs.result_xml_path }}
# ${{ inputs.report_html_path }}
# - name: Render result
# if: ${{ steps.run_integration_tests.outcome == 'success' || steps.run_integration_tests.outcome == 'failure' }}
# uses: pmeier/[email protected]
# with:
# path: ${{ inputs.result_xml_path }}
# summary: True
# display-options: fEX
# fail-on-empty: True
# title: Test results