-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.19 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
49
50
51
52
name: CI
on:
- push
- pull_request
env:
FORCE_COLOR: 1
jobs:
test:
name: '🧪 Test: Python ${{ matrix.python }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- '3.12'
- '3.11'
- '3.10'
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pdm install -G test --frozen-lockfile
- name: Run pytest
run: pdm run pytest -v
- name: Write coverage.xml
run: pdm run coverage xml
- name: Upload coverage data to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
lint:
name: 🧐 Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '3.12'
- name: Install dependencies
run: pdm install -G lint --frozen-lockfile
- name: Lint with ruff
run: pdm run lint-ruff
- name: Type check with mypy
run: pdm run mypy