-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 1.65 KB
/
check.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Check
on:
push:
pull_request:
schedule:
- cron: 0 12 1 * *
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run tests with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
include:
- python-version: '3.10'
tox-env: tests-py310
- python-version: '3.11'
tox-env: tests-py311
- python-version: '3.12'
tox-env: tests-py312
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: python -m pip install tox tox-uv
- name: Setup environment
run: tox -vv --notest -e ${{ matrix.tox-env }},coverage
- name: Run tests
run: tox --skip-pkg-install -e ${{ matrix.tox-env }},coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: .tox/coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install tox
run: python -m pip install tox tox-uv
- name: Setup environment
run: tox -vv --notest -e lint
- name: Run linters
run: tox --skip-pkg-install -e lint