Skip to content

Commit b17884e

Browse files
committed
Use container style in gh action
1 parent 6d7b19d commit b17884e

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/test-and-pre-release.yml

+17-9
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,36 @@ jobs:
1313
linux_tests:
1414
# The type of runner that the job will run on
1515
runs-on: ubuntu-latest
16+
container:
17+
image: qgis/qgis:${{ matrix.qgis-image-tags }}
1618
strategy:
1719
matrix:
1820
# Remove unsupported versions and add more versions. Use LTR version in the cov_tests job
19-
docker_tags: [release-3_10, release-3_16, latest]
21+
docker_tags: [release-3_28, release-3_34, latest]
2022
fail-fast: false
2123

2224
# Steps represent a sequence of tasks that will be executed as part of the job
2325
steps:
2426
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
2628
with:
2729
submodules: true
2830

29-
- name: Pull qgis
30-
run: docker pull qgis/qgis:${{ matrix.docker_tags }}
31+
- name: Install dependencies
32+
run: |
33+
pip3 install virtualenv
34+
virtualenv .venv --system-site-packages
35+
source .venv/bin/activate
36+
pip install -qr requirements-dev.txt --no-deps
37+
pip install . --no-deps
3138
32-
# Runs all tests
3339
- name: Run tests
34-
run: >
35-
docker run --rm --net=host --volume `pwd`:/app -w=/app -e QGIS_PLUGIN_IN_CI=1 qgis/qgis:${{ matrix.docker_tags }} sh -c
36-
"pip3 install -qr requirements-dev.txt && xvfb-run -s '+extension GLX -screen 0 1024x768x24'
37-
pytest -v --cov=arho_feature_template --cov-report=xml"
40+
env:
41+
QGIS_PLUGIN_IN_CI: 1
42+
QT_QPA_PLATFORM: offscreen
43+
run: |
44+
source .venv/bin/activate
45+
pytest
3846
3947
windows_tests:
4048
runs-on: windows-latest

0 commit comments

Comments
 (0)