Skip to content

Commit d782092

Browse files
JoonalaiLKajan
authored andcommitted
Use virtualenv for tests
1 parent 2df4d86 commit d782092

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,22 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Install dependencies
20+
- name: Install venv
2121
run: |
22-
python3 -m pip install -U pip setuptools
23-
pip3 install -qr requirements.txt pytest-cov
24-
pip3 install -e .
22+
apt update
23+
apt install -y python3-venv
24+
- name: Create virtualenv and install dependencies
25+
run: |
26+
python3 -m venv --system-site-packages .venv
27+
.venv/bin/pip install -U pip setuptools
28+
.venv/bin/pip install -qr requirements.txt pytest-cov
29+
.venv/bin/pip install -e .
2530
- name: Run tests
2631
env:
2732
QGIS_IN_CI: 1
2833
run: >
2934
xvfb-run -s '+extension GLX -screen 0 1024x768x24'
30-
python3 -m pytest -v --cov src/pytest_qgis --cov-report=xml -m 'not with_pytest_qt' -p no:pytest-qt tests
35+
.venv/bin/pytest -v --cov src/pytest_qgis --cov-report=xml -m 'not with_pytest_qt' -p no:pytest-qt tests
3136
3237
# Upload coverage report. Will not work if the repo is private
3338
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)