-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (46 loc) · 1.35 KB
/
ci.yml
File metadata and controls
61 lines (46 loc) · 1.35 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: Lint, Test & Build
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "latest"
- name: Set up Python
run: uv python install 3.13
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Lint with Ruff
run: uv run ruff check src tests
- name: Check formatting
run: uv run ruff format src tests --check
- name: Type check with Mypy
run: uv run python -m mypy src tests
- name: Security scan with Bandit
run: uv run bandit -r src
- name: Run tests with Coverage
run: uv run python -m pytest --cov --cov-report=xml --cov-report=term-missing
- name: Post coverage comment on PR
if: github.event_name == 'pull_request'
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 80
MINIMUM_ORANGE: 60
- name: Build package
run: uv build