Skip to content

Commit 7c64cbd

Browse files
authored
Update validation-tests.yml
1 parent 9bd75b9 commit 7c64cbd

File tree

1 file changed

+108
-13
lines changed

1 file changed

+108
-13
lines changed

.github/workflows/validation-tests.yml

Lines changed: 108 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,68 @@ on:
99
default: 'main'
1010
required: false
1111
description: 'Branch name to use'
12-
validation-tests:
12+
validation-tests-1:
1313
type: string
1414
default: 'tests/single/video/pacing'
1515
required: true
16-
description: 'Validation tests to run'
16+
description: '1st validation tests to run'
17+
validation-tests-2:
18+
type: string
19+
default: ''
20+
required: false
21+
description: '2nd validation tests to run'
22+
validation-tests-3:
23+
type: string
24+
default: ''
25+
required: false
26+
description: '3th validation tests to run'
27+
validation-tests-4:
28+
type: string
29+
default: ''
30+
required: false
31+
description: '4th validation tests to run'
32+
validation-tests-5:
33+
type: string
34+
default: ''
35+
required: false
36+
description: '5th validation tests to run'
37+
validation-pre-release-1:
38+
description: 'Select from pre-release group tests nr-1'
39+
required: false
40+
type: choice
41+
options:
42+
- NONE
43+
- ancillary
44+
- kernel-socket
45+
- rss-mode
46+
- st20p
47+
- st30p
48+
- st41
49+
- udp
50+
- video
51+
- xdp
52+
validation-pre-release-2:
53+
description: 'Select from pre-release group tests nr-2'
54+
required: false
55+
type: choice
56+
options:
57+
- NONE
58+
- ffmpeg-plugin
59+
- fuzzy-tests
60+
- performance
61+
- ptp
62+
- rx-timing
63+
- vero
64+
- virtio-enable
65+
- wrong-parameter
66+
validation-pre-release-3:
67+
description: 'Select from pre-release group tests nr-3'
68+
required: false
69+
type: choice
70+
options:
71+
- NONE
72+
- gpu-direct
73+
- gpu-enabling
1774

1875
env:
1976
# Customize the env if
@@ -89,6 +146,9 @@ jobs:
89146
validation-run-tests:
90147
needs: [validation-build-mtl]
91148
runs-on: [Linux, self-hosted, DPDK]
149+
env:
150+
PYTEST_ALIAS: 'sudo --preserve-env python3 -m pipenv run pytest'
151+
PYTEST_PARAMS: '--nic="${TEST_PORT_P},${TEST_PORT_R}" --media=/mnt/media --build="../.."'
92152
steps:
93153
- name: 'preparation: Harden Runner'
94154
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -111,27 +171,62 @@ jobs:
111171
run: |
112172
sudo MtlManager &
113173
114-
- name: 'execution: Run tests in pipenv environment'
174+
- name: 'execution: Run validation-tests-1 in pipenv environment'
175+
if: always() && inputs.validation-tests-1 != ''
115176
working-directory: tests/validation
116177
run: |
117-
sudo --preserve-env python3 -m pipenv run pytest '${{ inputs.validation-tests }}' --nic="${TEST_PORT_P},${TEST_PORT_R}" --media=/mnt/media --build='../..'
178+
${{ env.PYTEST_ALIAS }} '${{ inputs.validation-tests-1 }}' ${{ env.PYTEST_PARAMS }}
118179
119-
validation-cleanup-tests:
120-
needs: [validation-build-mtl, validation-run-tests]
121-
runs-on: [Linux, self-hosted, DPDK]
122-
if: always()
123-
steps:
124-
- name: 'preparation: Harden Runner'
125-
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
126-
with:
127-
egress-policy: audit
180+
- name: 'execution: Run validation-tests-2 in pipenv environment'
181+
if: always() && inputs.validation-tests-2 != ''
182+
working-directory: tests/validation
183+
run: |
184+
${{ env.PYTEST_ALIAS }} '${{ inputs.validation-tests-2 }}' ${{ env.PYTEST_PARAMS }}
185+
186+
- name: 'execution: Run validation-tests-3 in pipenv environment'
187+
if: always() && inputs.validation-tests-3 != ''
188+
working-directory: tests/validation
189+
run: |
190+
${{ env.PYTEST_ALIAS }} '${{ inputs.validation-tests-3 }}' ${{ env.PYTEST_PARAMS }}
191+
192+
- name: 'execution: Run validation-tests-4 in pipenv environment'
193+
if: always() && inputs.validation-tests-4 != ''
194+
working-directory: tests/validation
195+
run: |
196+
${{ env.PYTEST_ALIAS }} '${{ inputs.validation-tests-4 }}' ${{ env.PYTEST_PARAMS }}
197+
198+
- name: 'execution: Run validation-tests-5 in pipenv environment'
199+
if: always() && inputs.validation-tests-5 != ''
200+
working-directory: tests/validation
201+
run: |
202+
${{ env.PYTEST_ALIAS }} '${{ inputs.validation-tests-5 }}' ${{ env.PYTEST_PARAMS }}
203+
204+
- name: 'execution: Run validation-pre-release-1 in pipenv environment'
205+
if: always() && inputs.validation-pre-release-1 != 'NONE'
206+
working-directory: tests/validation
207+
run: |
208+
echo "== TO BE IMPLEMENTED ${{ inputs.inputs.validation-pre-release-1 }} =="
209+
210+
- name: 'execution: Run validation-pre-release-2 in pipenv environment'
211+
if: always() && inputs.validation-pre-release-2 != 'NONE'
212+
working-directory: tests/validation
213+
run: |
214+
echo "== TO BE IMPLEMENTED ${{ inputs.inputs.validation-pre-release-2 }} =="
215+
216+
- name: 'execution: Run validation-pre-release-3 in pipenv environment'
217+
if: always() && inputs.validation-pre-release-3 != 'NONE'
218+
working-directory: tests/validation
219+
run: |
220+
echo "== TO BE IMPLEMENTED ${{ inputs.inputs.validation-pre-release-3 }} =="
128221
129222
- name: 'cleanup: Kill MtlManager and pytest routines'
223+
if: always()
130224
run: |
131225
sudo killall -SIGINT pipenv || true
132226
sudo killall -SIGINT pytest || true
133227
sudo killall -SIGINT MtlManager || true
134228
135229
- name: 'cleanup: Restore valid owner to repository and directories'
230+
if: always()
136231
run: |
137232
sudo chown -R "${USER}" "$(pwd)"

0 commit comments

Comments
 (0)