-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (78 loc) · 2.39 KB
/
qa.yml
File metadata and controls
99 lines (78 loc) · 2.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: QA
on:
push:
branches:
- "*"
pull_request:
schedule:
- cron: "0 6 * * 1"
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install quality dependencies
run: |
python -m pip install --upgrade pip uv
uv pip install --system --upgrade -e ".[dev]"
- name: Check Python formatting (black + isort)
run: |
black . --check
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v23
- name: Lint reStructuredText (doc8)
run: |
doc8 docs --max-line-length=120
- name: Run Semgrep SAST
if: github.event_name == 'pull_request' || github.event_name == 'schedule'
uses: semgrep/semgrep-action@v1
with:
config: p/ci
test:
runs-on: ubuntu-latest
needs: quality
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install CI tools
run: |
python -m pip install --upgrade pip uv
uv pip install --system --upgrade -e ".[dev]"
- name: Install project dependencies
run: pip install -e .
- name: Test with coverage
run: |
pytest --cov=pyfwf --cov-report=xml:coverage.xml --cov-report=term-missing
pytest-coverage-gate --coverage-xml=coverage.xml --baseline=.coverage-baseline
- name: Upload coverage artifacts
uses: actions/upload-artifact@v7
with:
name: coverage-reports-py${{ matrix.python-version }}
path: coverage.xml
if-no-files-found: error
- name: Upload coverage to Codecov
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: codecov/codecov-action@v6
with:
use_oidc: true
files: coverage.xml
flags: py${{ matrix.python-version }}
fail_ci_if_error: false