-
Notifications
You must be signed in to change notification settings - Fork 9
62 lines (59 loc) · 1.69 KB
/
do-checks-and-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
58
59
60
61
62
name: Run linters and tests
on: [push, workflow_call, workflow_dispatch]
jobs:
run-linters:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Upgrade pip and install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run linter
run: tox -e flake8
run-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- python: '2.7'
tox-env: '27'
- python: '3.5'
tox-env: '35'
- python: '3.6'
tox-env: '36'
- python: '3.7'
tox-env: '37'
- python: '3.8'
tox-env: '38'
- python: '3.9'
tox-env: '39'
- python: '3.10'
tox-env: '310'
- python: '3.11'
tox-env: '311'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Upgrade pip and install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run tests
run: |
tox -e "py${{ matrix.tox-env }}-oldest"
tox -e "py${{ matrix.tox-env }}-latest"
trigger-publish:
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
needs: [run-linters, run-tests]
uses: ./.github/workflows/publish.yml
secrets:
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}