-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (48 loc) · 1.46 KB
/
Copy pathci-python.yml
File metadata and controls
62 lines (48 loc) · 1.46 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
# .github/workflows/ci-python.yml
# Runs Python quality checks on PRs and pushes to main.
# Skips when only dashboard/ files change.
# @author Claude Sonnet 4.6 Anthropic
on:
push:
branches: [main]
paths-ignore:
- 'dashboard/**'
pull_request:
paths-ignore:
- 'dashboard/**'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: uv sync --extra dev
- name: Lint (ruff check)
run: uv run ruff check .
- name: Format check (ruff format)
run: uv run ruff format --check .
- name: Type check (mypy)
run: uv run mypy src/ tests/
- name: Security lint (bandit)
run: uv run bandit -r src/ -c pyproject.toml
- name: Test (pytest)
run: uv run pytest
dependency-audit:
# Separate job (not a step in `ci`) so that a dependency advisory landing
# on an unrelated day fails only this check, instead of aborting the `ci`
# job before pytest runs and misreporting "this commit broke CI".
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: uv sync --extra dev
- name: Dependency audit (pip-audit)
run: uv run pip-audit