-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.41 KB
/
Copy pathci.yml
File metadata and controls
58 lines (49 loc) · 1.41 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel in-progress runs for the same ref when a new commit arrives.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Tests (Python ${{ matrix.python }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ['3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Set up Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install project + dev dependencies
run: uv sync --python ${{ matrix.python }}
# Live database tests are gated behind `skipif` on the presence of
# local connection.properties files — on CI runners they will skip
# automatically, so unit-only execution is the default here.
- name: Run tests
run: uv run python -m pytest -q --tb=short
build:
name: Build sdist + wheel
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.sha }}
path: dist/
retention-days: 7