-
Notifications
You must be signed in to change notification settings - Fork 12
62 lines (55 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
62 lines (55 loc) · 1.7 KB
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: CI
on:
pull_request:
push:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
container:
image: qgis/qgis:${{ matrix.qgis-tags }}
strategy:
matrix:
qgis-tags: [ release-3_34, "3.40", "3.44", "4.0-trixie", latest ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install venv
run: |
apt update
apt install -y python3-venv curl
- name: Create virtualenv and install dependencies
run: |
python3 -m venv --system-site-packages .venv
.venv/bin/pip3 install -q -U uv
.venv/bin/uv sync --locked
- name: Run tests
env:
QGIS_IN_CI: 1
run: >
xvfb-run -s '+extension GLX -screen 0 1024x768x24'
.venv/bin/pytest -v --cov src/pytest_qgis --cov-report=xml -m 'not with_pytest_qt' -p no:pytest-qt tests
# Upload coverage report. Will not work if the repo is private
- name: Upload coverage to Codecov
if: ${{ matrix.qgis-tags == 'latest' && !github.event.repository.private }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: pytest
fail_ci_if_error: false # set to true when upload is working
verbose: false
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
# changelog:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Run Changelog CI
# uses: saadmk11/changelog-ci@v1.0.0
# with:
# config_file: changelog-ci-config.json