-
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (60 loc) · 1.97 KB
/
Copy pathtest-python.yml
File metadata and controls
65 lines (60 loc) · 1.97 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
64
65
# eustasy/.Normal 4.0beta16
name: "Test: Python"
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "**.py"
- "tests/**"
- "requirements.txt"
- "pyproject.toml"
- "pytest.ini"
- "setup.cfg"
- "tox.ini"
- ".github/workflows/test-python.yml"
pull_request:
branches: [main]
paths:
- "**.py"
- "tests/**"
- "requirements.txt"
- "pyproject.toml"
- "pytest.ini"
- "setup.cfg"
- "tox.ini"
- ".github/workflows/test-python.yml"
permissions:
contents: read
jobs:
test-python:
name: pytest + coverage
runs-on: ubuntu-latest
# Job-level so it reaches pytest inside the composite action. coverage.py's
# default C tracer under-counts `async def` bodies, so async routes (e.g. the
# /activate pipeline) look far less covered than they are. The sys.monitoring
# backend (PEP 669, Python 3.12+) measures them correctly; 3.11 lacks
# sys.monitoring, so it keeps the default tracer.
env:
COVERAGE_CORE: ${{ startsWith(matrix.python-version, '3.11') && 'ctrace' || 'sysmon' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: eustasy/.normal/python/setup@v4
with:
python-version: ${{ matrix.python-version }}
install-command: pip install -e ".[dev]"
# Insert project-specific steps here — fixtures, config files, migrations.
- uses: eustasy/.normal/python/test@v4
with:
coverage-token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
upload: ${{ matrix.python-version == '3.13' }}
# Coverage is measured with source=["locksmith"], so cobertura paths are
# relative to the package (api/app.py). Prepend the package dir so they
# resolve against the repo root (locksmith/api/app.py).
add-prefix: locksmith