-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
75 lines (69 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
71
72
73
74
75
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dev dependencies
run: uv sync --group dev
- name: Ruff format (check only)
run: uv run ruff format --check .
- name: Ruff lint
run: uv run ruff check .
typecheck:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv sync --group dev
- run: uv run mypy
security:
name: Security scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- run: uv sync --group dev
- name: Bandit static analysis
run: uv run bandit -c pyproject.toml -r jwt_toolkit --severity-level medium
- name: pip-audit dependency CVEs
run: uv run pip-audit
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- run: uv sync --group dev
- name: Run tests with coverage
run: uv run pytest --cov --cov-report=term-missing --cov-report=xml -n auto
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.python-version }}
path: coverage.xml
if-no-files-found: ignore