Skip to content

Commit eceb8cb

Browse files
committed
Run flake8 separately from tests
1 parent b068120 commit eceb8cb

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,30 @@ jobs:
3838
print(f'{hashseed=}')
3939
open(os.environ['GITHUB_OUTPUT'], 'a').write(f'hashseed={hashseed}')"
4040
41+
flake8:
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Check out code
46+
uses: actions/checkout@main
47+
48+
- name: Set up Python 3.10
49+
uses: actions/setup-python@main
50+
51+
- name: Run Flake8
52+
uses: julianwachholz/flake8-action@v2
53+
with:
54+
checkName: flake8
55+
config: flake8.ini
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
4159
# Tests job
4260
tests:
4361
# The type of runner that the job will run on
4462
runs-on: ubuntu-latest
4563

46-
needs: generate-hashseed
64+
needs: [generate-hashseed, flake8]
4765

4866
strategy:
4967
matrix:

flake8.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
filename=
3+
setup.py,
4+
dpath/,
5+
tests/

tox.ini

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,18 @@
77
ignore = E501,E722
88

99
[tox]
10-
envlist = pypy37, py38, py39, py310, flake8
10+
envlist = pypy37, py38, py39, py310
1111

1212
[gh-actions]
1313
python =
1414
pypy-3.7: pypy37
1515
3.8: py38
1616
3.9: py39
17-
3.10: py310, flake8
17+
3.10: py310
1818

1919
[testenv]
2020
deps =
2121
hypothesis
2222
mock
2323
nose2
2424
commands = nose2 {posargs}
25-
26-
[testenv:flake8]
27-
deps =
28-
flake8
29-
commands = flake8 setup.py dpath/ tests/

0 commit comments

Comments
 (0)