-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (79 loc) · 2.25 KB
/
ci.yaml
File metadata and controls
95 lines (79 loc) · 2.25 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
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ci:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
steps:
- name: 💾 Check out repository
uses: actions/checkout@v6
- name: 🪪 Configure git identity for tests
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: 🦀 Set up Python project with uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: 🐍 Install dependencies
run: uv sync
- name: 📐 Lint
run: uv run poe lint
- name: 🔥 Test
run: uv run poe test
- name: 🔍 Collect coverage results
run: uv run coverage xml
if: ${{ matrix.python-version == '3.14' }}
- name: 📊 Upload coverage to Codecov
uses: codecov/codecov-action@v6
if: ${{ matrix.python-version == '3.14' }}
with:
fail_ci_if_error: true
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: 💾 Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 🦀 Set up Python project with uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: '3.14'
- name: 🐍 Install dependencies
run: uv sync
- name: 📖 Build documentation
run: uv run poe docs-build
gitleaks:
name: Secret scan
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 💾 Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 🔍 Check for secrets
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}