1
1
name : smoke-tests-bare-metal
2
2
on :
3
+ workflow_call :
3
4
workflow_dispatch :
4
5
push :
5
6
branches :
9
10
branches :
10
11
- main
11
12
- ' maint-**'
13
+
12
14
env :
15
+ DEBIAN_FRONTEND : noninteractive
13
16
BUILD_TYPE : ' Release'
14
17
DPDK_VERSION : ' 25.03'
15
18
DPDK_REBUILD : ' false'
19
+
16
20
permissions :
17
21
contents : read
22
+
23
+ concurrency :
24
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
25
+ cancel-in-progress : true
26
+
18
27
jobs :
19
28
validation-build-mtl :
20
29
runs-on : [Linux, self-hosted, DPDK]
21
30
timeout-minutes : 60
22
- outputs :
23
- pipenv-activate : ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }}
24
31
steps :
25
32
- name : ' preparation: Harden Runner'
26
33
uses : step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
61
68
sudo apt-get install -y \
62
69
git gcc meson tar zip \
63
70
pkg-config \
64
- python3 \
71
+ python3-dev \
65
72
python3-pyelftools \
66
73
python3-virtualenv \
67
74
python3-pip \
@@ -112,23 +119,18 @@ jobs:
112
119
make -j "$(nproc)"
113
120
sudo make install
114
121
sudo ldconfig
122
+
115
123
- name : ' installation: Build GStreamer'
116
124
working-directory : ecosystem/gstreamer_plugin
117
125
run : |
118
126
./build.sh
119
- - name : ' installation: Install pipenv environment'
120
- working-directory : tests/validation
121
- id : pipenv-install
122
- run : |
123
- python3 -m venv venv
124
- source venv/bin/activate
125
- pip install -r requirements.txt
126
- echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV"
127
+
127
128
validation-run-tests :
128
129
needs : [validation-build-mtl]
129
130
runs-on : [Linux, self-hosted, DPDK]
130
131
timeout-minutes : 720
131
132
env :
133
+ PIPENV_VENV_IN_PROJECT : ' 1'
132
134
PYTEST_RETRIES : ' 3'
133
135
steps :
134
136
- name : ' preparation: Harden Runner'
@@ -153,12 +155,28 @@ jobs:
153
155
sudo rmmod irdma || true
154
156
sudo ./script/nicctl.sh create_vf "${TEST_PF_PORT_P}" || true
155
157
sudo ./script/nicctl.sh create_vf "${TEST_PF_PORT_R}" || true
158
+
159
+ - name : ' installation: Install pipenv environment'
160
+ working-directory : tests/validation
161
+ run : |
162
+ sudo apt update && \
163
+ sudo apt install -y \
164
+ python3-dev \
165
+ python3-pyelftools \
166
+ python3-virtualenv \
167
+ python3-pip \
168
+ pipenv && \
169
+ pipenv install -r requirements.txt
170
+
156
171
- name : ' preparation: Start MtlManager at background'
157
172
run : |
158
173
sudo MtlManager &
174
+
159
175
- name : ' execution: Run validation-bare-metal tests in virtual environment'
176
+ working-directory : tests/validation
160
177
run : |
161
- sudo tests/validation/venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m smoke --template=html/index.html --report=report.html
178
+ sudo pipenv run pytest --topology_config=configs/topology_config.yaml --test_config=configs/test_config.yaml -m smoke --template=html/index.html --report=report.html
179
+
162
180
- name : " upload report"
163
181
id : upload-report
164
182
uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
0 commit comments