-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·50 lines (47 loc) · 1.29 KB
/
test.yaml
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: Test
on:
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install "tox >= 3.26.0"
- name: Run flake8 via tox
run: python -m tox -e flake
- name: Run black via tox
run: python -m tox -e black -- --check
- name: Run mypy via tox
run: python -m tox -e type
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
py: ['3.8', '3.9', '3.10', '3.11']
os: ['ubuntu-latest', 'windows-latest']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install "tox-gh-actions >= 2.10.0"
python -m pip install "tox >= 3.26.0"
- name: Run tests via tox
run: python -m tox
- name: Upload code coverage
uses: codecov/codecov-action@v3