-
Notifications
You must be signed in to change notification settings - Fork 15
76 lines (75 loc) · 1.94 KB
/
tox.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: gh
on:
pull_request:
jobs:
gh:
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- name: linters
python-version: 3.8
# - name: docs
# python-version: 3.8
# continue-on-error: true
- name: packaging
python-version: 3.8
- name: py37
python-version: 3.7
- name: py38
python-version: 3.8
- name: py39
python-version: 3.9
- name: py310
python-version: "3.10"
- name: py311
python-version: "3.11"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # needed by setuptools-scm
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: >-
Log the currently selected Python
version info (${{ matrix.python-version }})
run: |
python --version --version
which python
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ env.PY_SHA256 }}-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml', 'pytest.ini') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install tox
run: |
python3 -m pip install --upgrade tox
- name: Log installed dists
run: >-
python3 -m pip freeze --all
- name: "Test with tox"
run: |
python3 -m tox
env:
TOXENV: ${{ matrix.name }}
- name: Archive logs
uses: actions/upload-artifact@v2
with:
name: logs.zip
path: .tox/**/log/
check:
needs:
- gh
runs-on: ubuntu-latest
steps:
- name: Report success of the test matrix
run: >-
print("All's good")
shell: python