forked from gforcada/flake8-isort
-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.39 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
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
paths:
- "flake8_isort.py"
- "test_flake8_isort.py"
- "setup.py"
- ".github/workflows/tests.yml"
jobs:
tests:
runs-on: ubuntu-latest
name: Python ${{ matrix.python-version }} x isort ${{ matrix.isort }} x flake8 ${{ matrix.flake8 }}
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3']
isort: [4.3.21, 5.10.1]
flake8: [3.9.2, 4.0.1, 5.0.4]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install matrix dependencies
run: pip install 'isort==${{ matrix.isort }}' 'flake8==${{ matrix.flake8 }}'
# isort 4.x requires `toml` to be able to read pyproject.toml, so install it...
- name: Install toml if required
run: pip install toml
if: matrix.isort == '4.3.21'
- name: Install dependencies
run: pip install .[test]
- name: flake8
run: flake8 *.py
- name: pytest
run: pytest -v --cov flake8_isort --cov-report term-missing
- name: Upload coverage
run: |
python -m pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}