-
-
Notifications
You must be signed in to change notification settings - Fork 32
48 lines (44 loc) · 1.09 KB
/
ci.yml
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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
main:
strategy:
fail-fast: false
matrix:
include:
- name: "pytest"
python: "3.12"
tox: "3.12"
coverage: true
- name: "ruff-format"
python: "3.12"
tox: ruff-format
- name: "ruff-lint"
python: "3.12"
tox: ruff-lint
- name: "mypy"
python: "3.12"
tox: mypy
- name: "docs"
python: "3.12"
tox: docs
name: ${{ matrix.name }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
- run: uv pip install tox tox-uv
- run: tox -e ${{ matrix.tox }}
if: ${{ ! matrix.coverage }}
- run: tox -e ${{ matrix.tox }} -- --cov-report=xml
if: ${{ matrix.coverage }}
- uses: codecov/codecov-action@v4
if: ${{ matrix.coverage }}
with:
token: ${{ secrets.CODECOV_TOKEN }}