-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (54 loc) · 1.61 KB
/
ci.yml
File metadata and controls
65 lines (54 loc) · 1.61 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
name: Python package
on:
push:
branches:
- 'master'
pull_request:
jobs:
lint-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Lint
run: uv run --python ${{ matrix.python-version }} --extra dev ruff check --output-format=github
- name: Generate coverage report
run: |
uv run --python ${{ matrix.python-version }} --extra dev \
pytest tests/ \
--cov=. \
--cov-branch \
--cov-report=term-missing \
--cov-report=html:cov_html \
--cov-report=markdown-append:$GITHUB_STEP_SUMMARY \
--verbose
- uses: actions/upload-artifact@v6
with:
name: html-coverage-artifact
path: ./cov_html/
test:
needs: lint-coverage
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: macos-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.10"
steps:
- uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@v7
- name: Install and test
run: uv run --python ${{ matrix.python-version }} --extra dev pytest