-
Notifications
You must be signed in to change notification settings - Fork 9
70 lines (57 loc) · 1.9 KB
/
Copy pathpr-checks.yml
File metadata and controls
70 lines (57 loc) · 1.9 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
66
67
68
69
70
name: PR Checks
# Pre-merge tier (v0.7.14, ADR-027 rule 1): pull requests run the static
# quality gates plus a small smoke battery — core, golden, and dogfood on one
# Python version. The full battery × version grid stays merge-gated on main
# (ci.yml); this tier exists to catch lint/type breakage, output-contract
# drift, and corpus damage before merge, in about two minutes.
on:
pull_request:
permissions:
contents: read
concurrency:
group: pr-checks-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: lint (ruff + mypy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
- name: ruff check
run: python -m ruff check src/ tests/
- name: ruff format --check
run: python -m ruff format --check src/ tests/
- name: mypy
run: python -m mypy src/
smoke:
name: smoke (core + golden + dogfood, py3.11)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package with dev extras
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
- name: Run smoke battery
run: >
python -m pytest -q
tests/test_validate.py tests/test_parser.py tests/test_schema.py
tests/test_identity.py tests/test_frontmatter.py
tests/test_metadata_identity.py tests/test_idgen.py
tests/test_ci_batteries.py tests/test_corpus.py
tests/test_operations.py
tests/test_golden.py tests/test_dogfood.py