-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.03 KB
/
test_plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Test
on:
workflow_dispatch:
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
qgis_image_tag: [release-3_22, release-3_28]
env:
OS: ubuntu
QGIS_IMAGE_TAG: ${{ matrix.qgis_image_tag }}
steps:
- uses: actions/checkout@v3
- name: Pull QGIS
run: docker pull qgis/qgis:${{ matrix.qgis_image_tag }}
- name: Export requirements.txt
run: |
pip3 install poetry
poetry export --with dev --without pyqt5 -f requirements.txt -o requirements.txt
- name: Run tests
run: >
docker run --rm --volume `pwd`:/app -w=/app qgis/qgis:latest sh -c
"pip3 install -r requirements.txt && PYTHONPATH=/app xvfb-run -s '+extension GLX -screen 0 1024x768x24'
pytest -v --cov --cov-report=xml --cov-report=term"
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,QGIS_IMAGE_TAG
fail_ci_if_error: false