Repository navigation
55 lines (52 loc) · 1.64 KB
/
Copy pathtest-updater.yaml
File metadata and controls
55 lines (52 loc) · 1.64 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
name: Test - Updater
on:
push:
branches: [master]
pull_request:
branches: [master]
paths:
- "updater/src/**"
- "updater/tests/**"
- "updater/pyproject.toml"
- "schemas/**"
- "site_plugins/**"
- "requirements.txt"
- ".github/workflows/test-updater.yaml"
permissions:
contents: read
jobs:
tests:
name: Updater
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install Python dependencies
run: python -m pip install -r requirements.txt 'coverage>=7.6.0'
- name: Run updater tests with coverage
env:
PYTHONPATH: updater/src
run: |
python -m coverage run --source=updater/src,schemas,site_plugins \
-m unittest discover -s updater/tests -v
python -m coverage report
python -m coverage json -o coverage-summary.json
python -m coverage html -d coverage-html
- name: Upload coverage summary
if: always() && hashFiles('coverage-summary.json') != ''
uses: actions/upload-artifact@v7
with:
name: coverage-summary-${{ github.event.number }}-updater
path: coverage-summary.json
if-no-files-found: error
retention-days: 7
- name: Upload coverage report
if: always() && hashFiles('coverage-html/index.html') != ''
uses: actions/upload-artifact@v7
with:
name: coverage-report-${{ github.event.number }}-updater
path: coverage-html/
if-no-files-found: error
retention-days: 7