-
Notifications
You must be signed in to change notification settings - Fork 41
94 lines (86 loc) · 2.54 KB
/
Copy pathci.yml
File metadata and controls
94 lines (86 loc) · 2.54 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
name: CI
on:
push:
branches: [develop, master, main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.10', 'pypy3.11']
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: test-${{ matrix.python-version }}
# tox-gh-actions maps the running interpreter to the matching env via the
# [gh-actions] table in tox.ini (PyPy keyed as `pypy-3.10` / `pypy-3.11`).
# COVERAGE_FILE gives each cell a unique data file for the combine job.
- run: uvx --with tox-uv --with tox-gh-actions tox
env:
COVERAGE_FILE: .coverage.${{ matrix.python-version }}
- uses: actions/upload-artifact@v7
with:
name: coverage-${{ matrix.python-version }}
path: .coverage.*
include-hidden-files: true
if-no-files-found: error
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
cache-suffix: lint
- run: uvx --with tox-uv tox -e lint
type-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
checker: [mypy, pyright, pyrefly]
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
cache-suffix: type-check-${{ matrix.checker }}
- run: uvx --with tox-uv tox -e ${{ matrix.checker }}
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
cache-suffix: codespell
- run: uvx --with tox-uv tox -e codespell
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
cache-suffix: docs
- run: uvx --with tox-uv tox -e docs
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
cache-suffix: coverage
- uses: actions/download-artifact@v8
with:
pattern: coverage-*
merge-multiple: true
- run: uv run coverage combine
- run: uv run coverage report --show-missing --fail-under=100