-
Notifications
You must be signed in to change notification settings - Fork 314
57 lines (53 loc) · 1.38 KB
/
tests.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
name: Tests (tox)
on:
push:
branches: [main]
pull_request:
branches: [main]
paths-ignore:
- '*.md'
- ChangeLog
- LICENSE
- docs/**
permissions:
contents: read
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
os:
- ubuntu-latest
- macos-latest
- windows-latest
env:
SKIP_ENVS: ${{ (matrix.py != '3.12' || matrix.os == 'windows-latest') && '--skip-env=cli' || '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: ${{ matrix.py == '3.12' && matrix.os != 'windows-latest' && 'true' || 'false' }}
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
cache: 'pip'
- name: Cache .mypy_cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: ${{ matrix.os }}-${{ matrix.py }}-mypy
- name: Install tox-gh
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install ${{ env.SKIP_ENVS }}