Fix action failing on running pytest as sudo

This commit is contained in:
lwthiker
2022-04-12 21:59:26 +03:00
parent e04e53b4d5
commit f1b31726dc

View File

@@ -33,7 +33,8 @@ jobs:
- name: Install dependencies for the tests script - name: Install dependencies for the tests script
run: | run: |
pip install -r tests/requirements.txt # Install globally so that we can run 'pytest' with 'sudo'
sudo pip install -r tests/requirements.txt
- name: Run configure script - name: Run configure script
run: | run: |
@@ -59,4 +60,5 @@ jobs:
- name: Run the tests - name: Run the tests
run: | run: |
cd tests cd tests
# sudo is needed for capturing packets
sudo pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp}}/install sudo pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp}}/install