-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.27 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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
python:
name: tox ${{ matrix.tox }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tox: [py311, typing, style, docs, minimal, dist]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21'
- uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Install dot
run: sudo apt-get install -y graphviz
if: matrix.tox == 'docs'
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
if: matrix.tox == 'style'
- name: cache mypy
uses: actions/[email protected]
with:
path: ./.mypy_cache
key: mypy|python3.11|${{ hashFiles('pyproject.toml') }}
if: matrix.tox == 'typing'
- run: pip install tox
- run: tox -e ${{ matrix.tox }}