-
Notifications
You must be signed in to change notification settings - Fork 26
64 lines (52 loc) · 1.72 KB
/
ci.yml
File metadata and controls
64 lines (52 loc) · 1.72 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
name: CI
on:
push:
branches:
- "main"
pull_request: {}
defaults:
run:
shell: bash
jobs:
test:
name: Test Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install dependencies
run: uv sync --locked --dev
- name: Check formatting
run: uv run ruff format --check .
- name: Lint
run: uv run ruff check --extend-exclude .devbox
- name: Type Check
run: uv run mypy
- name: Test
run: uv run pytest
smoke-test:
name: Smoke test (Python ${{ matrix.python }})
if: "${{ github.event_name == 'pull_request' && contains(toJSON(github.event.pull_request.labels.*.name), 'autorelease: pending') }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
python-version: ${{ matrix.python }}
- name: Build
run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
- name: Smoke test (sdist)
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py