Repository navigation
54 lines (44 loc) · 1.84 KB
/
Copy pathci.yml
File metadata and controls
54 lines (44 loc) · 1.84 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
# The `build` extra is not optional here. tools/audit_release_artifact.py
# reads the Nuitka onefile payload through `zstandard`, and that package
# lives only in the build extra. With `--group dev` alone the artifact
# gate raises UnreadableArtifact instead of running -- fail-closed, so a
# bad artifact can never slip through, but the gate is dead in CI and a
# broken one is indistinguishable from a broken build. Installing the
# extra makes the gate actually execute below.
run: uv sync --group dev --extra build
- name: Compile
# catches import-time syntax errors before the long test run
run: uv run python -m compileall -q src FastPrompter.pyw
- name: Lint
run: uv run ruff check src/ tests/ tests_smoke/
- name: Security scan (Medium+ only)
# Low findings are intentional local desktop operations (startfile,
# try/except noise); Medium+ has a scoped # nosec per finding with a
# reason, so a new real finding turns this red.
run: uv run bandit -q -r src/fastprompter -ll
- name: Sound allowlist (source preflight)
# What would a push publish? Fails when the shipped folder and
# sounds-redistributable.manifest disagree in either direction.
run: uv run python tools/verify_sound_allowlist.py
- name: Test
run: uv run pytest tests/ tests_smoke/ -q