-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (64 loc) · 1.79 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
workflow_dispatch:
pull_request:
jobs:
lint:
name: Static analysis
uses: antonagestam/goose/.github/workflows/run.yaml@0.9.0
check-build:
name: Check packaging metadata
uses: less-action/reusables/.github/workflows/python-test-build.yaml@v8
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
check-latest: true
- run: pip install -e '.[test]'
- run: coverage run -m pytest
- run: coverage report -m && coverage xml
- uses: codecov/codecov-action@v5
if: '!github.event.schedule'
with:
files: coverage.xml
name: codecov-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
type-check:
name: Type check
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
COLUMNS: "150"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-typing.txt
check-latest: true
- name: mypy cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: "${{ runner.os }}-mypy-3.13-${{ hashFiles('requirements-typing.txt') }}"
restore-keys: |
${{ runner.os }}-mypy-3.13
${{ runner.os }}-mypy
- run: pip install -e .
- run: pip install -r requirements-typing.txt
- run: mypy --strict