-
Notifications
You must be signed in to change notification settings - Fork 3
95 lines (76 loc) · 2.37 KB
/
tests.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: "🎳 Tester"
on:
push:
branches: [main]
paths:
- "**/*.py"
- ".github/workflows/tests.yml"
pull_request:
branches: [main]
paths:
- "**/*.py"
- ".github/workflows/tests.yml"
- "requirements/base.txt"
- "requirements/testing.txt"
- tests/fixtures/
env:
PROJECT_FOLDER: "qgis_deployment_toolbelt"
jobs:
unit-test:
strategy:
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements/*.txt"
- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements.txt
python -m pip install -U -r requirements/testing.txt
- name: Install project as a package
run: python -m pip install -e .
- name: Unit tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
QDT_LOGS_LEVEL: 4
run: pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
integration-test:
strategy:
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements/*.txt"
- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements.txt
- name: Install project as a package
run: python -m pip install -e .
- name: QDT - Echoing help
run: qdt --help
- name: QDT - Echoing version
run: qdeploy-toolbelt --version
- name: QDT - Sample scenario
run: qgis-deployment-toolbelt --verbose
- name: QDT - Sample scenario
run: qgis-deployment-toolbelt --verbose --no-logfile