-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.93 KB
/
Copy pathci.yml
File metadata and controls
63 lines (54 loc) · 1.93 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
63
# CI with Docker-based QGIS test runner (Dockerfile at the repo root).
name: CI
on:
push:
branches: [master, main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image
run: |
docker build --pull -t qgis-plugin-test .
- name: Run tests with coverage
id: run_tests
continue-on-error: true
run: |
# Run container; coverage.xml is written to /plugins/data_wizard/ which maps
# to $(pwd) via the volume mount, so it appears on the host automatically.
docker run --rm \
-v $(pwd):/plugins/data_wizard \
qgis-plugin-test
- name: Verify and fix coverage report
run: |
if [ ! -f coverage.xml ]; then
echo "ERROR: coverage.xml not found after test run"
exit 1
fi
# Fix absolute container paths → relative repo paths
sed -i 's|/plugins/data_wizard/||g' coverage.xml
echo "coverage.xml found and paths fixed"
head -5 coverage.xml
# No Codecov project exists for this repository (see
# docs/test-strategy.md → Justified Exclusions and
# docs/contributing.md → Coverage Reporting). Coverage is produced
# locally and in the container but not uploaded to an external
# service — the report is kept as a downloadable CI artifact instead.
- name: Upload coverage report as CI artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage.xml
htmlcov/
retention-days: 30
- name: Fail job if tests failed
if: steps.run_tests.outcome == 'failure'
run: |
echo "Tests failed — see output above."
exit 1