forked from opengisch/OpenComptage
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.67 KB
/
ci.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
name: Lint, Check, Build, Test
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
pull_request:
jobs:
ensure_build_package:
name: Ensure build and package
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
- name: Setup, build, install
run: |
pip install build
python -m build .
pip install ./dist/comptages-0.1-py3-none-any.whl[test]
- name: Package
run: qgis-plugin-ci --no-validation package 'test'
- name: Lint
run: black . --diff --color
- name: Lint check
run: black . --check
- name: Check
run: pyright . > pyright_report.txt
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: Pyright Report
path: pyright_report.txt
test:
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
postgis_versions:
- 12-3.4
- 15-3.4
name: Test with PostGIS v. ${{ matrix.postgis_versions }}
steps:
- uses: actions/checkout@v4
- name: Start docker stack
run: POSTGIS_VERSION=${{ matrix.postgis_versions }} docker compose up db -d
- name: Running tests
run: POSTGIS_VERSION=${{ matrix.postgis_versions }} docker compose run qgis_tester
- name: Upload test coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report-${{ matrix.postgis_versions }}.txt
path: test_outputs/coverage_report.txt