-
Notifications
You must be signed in to change notification settings - Fork 9
77 lines (63 loc) · 1.72 KB
/
tester.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: "🎳 Tester"
on:
push:
branches:
- master
paths:
- '**.py'
- .github/workflows/tester.yml
- requirements/testing.txt
pull_request:
branches:
- master
paths:
- '**.py'
- .github/workflows/tester.yml
- requirements/testing.txt
env:
PROJECT_FOLDER: "menu_from_project"
PYTHON_VERSION: 3.9
jobs:
tests-unit:
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: "pip"
cache-dependency-path: "requirements/testing.txt"
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements/testing.txt
- name: Run Unit tests
run: pytest -p no:qgis tests/unit/
test-qgis:
runs-on: ubuntu-latest
container:
image: qgis/qgis:release-3_28
env:
CI: true
DISPLAY: ":1"
MUTE_LOGS: true
NO_MODALS: 1
PYTHONPATH: "/usr/share/qgis/python/plugins:/usr/share/qgis/python:."
QT_QPA_PLATFORM: "offscreen"
WITH_PYTHON_PEP: false
options: -v /tmp/.X11-unix:/tmp/.X11-unix
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Print QGIS version
run: qgis --version
- name: Install Python requirements
run: |
python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U -r requirements/testing.txt
- name: Run Unit tests
run: |
Xvfb :1 &
python3 -m pytest tests/qgis/