Skip to content

Commit 88a0777

Browse files
authored
Ci: Run test framework without sudo in workflows (#1273)
Running the test framework with sudo causes root to become the owner of some directories. This causes problems with permissions when trying to checkout in workflows. Running the framework without sudo should solve these problems.
1 parent e37ed49 commit 88a0777

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/nightly-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ jobs:
5555
sudo MtlManager &
5656
- name: 'execution: Run nightly-bare-metal tests in virtual environment'
5757
run: |
58-
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 nightly --template=html/index.html --report=report.html
59-
- name: Restore repository owner
60-
run: |
61-
sudo chown -R "${USER}" .
58+
tests/validation/.venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m nightly --template=html/index.html --report=report.html
6259
- name: "upload report"
6360
if: always()
6461
id: upload-report

.github/workflows/smoke-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ jobs:
6262
sudo MtlManager &
6363
- name: 'execution: Run validation-bare-metal tests in virtual environment'
6464
run: |
65-
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
66-
- name: Restore repository owner
67-
run: |
68-
sudo chown -R "${USER}" .
65+
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
6966
- name: "upload report"
7067
id: upload-report
7168
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3

0 commit comments

Comments
 (0)