Skip to content

Commit 644eeb7

Browse files
committed
chore: Integrate flake8 & black in gh actions
1 parent f3b7ff7 commit 644eeb7

File tree

3 files changed

+43
-9
lines changed

3 files changed

+43
-9
lines changed

.github/workflows/testing.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,41 @@ on:
1111
- release/*
1212

1313
jobs:
14+
validate:
15+
name: Code Validation
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Handle the code
21+
uses: actions/checkout@v2
22+
23+
- name: "Set up Python 3.10"
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: "3.10"
27+
28+
- name: Handle pip cache
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.cache/pip
32+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
33+
restore-keys: |
34+
${{ runner.os }}-pip-
35+
36+
- name: Install required dependencies
37+
run: |
38+
python3 -m pip install --upgrade pip
39+
pip install tox tox-wheel
40+
41+
- name: Code check
42+
run: tox -e ${TOX_VENV}
43+
env:
44+
TOX_VENV: black,pep8
45+
1446
test:
47+
needs: [validate]
48+
1549
name: >
1650
Test Python ${{ matrix.python-version }},
1751
ZK ${{ matrix.zk-version }}
@@ -21,18 +55,18 @@ jobs:
2155
strategy:
2256
fail-fast: false
2357
matrix:
24-
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7]
25-
zk-version: [3.4.14, 3.5.10, 3.6.3, 3.7.1]
58+
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
59+
zk-version: ["3.4.14", "3.5.10", "3.6.3", "3.7.1"]
2660
include:
27-
- python-version: 3.7
61+
- python-version: "3.7"
2862
tox-env: py37
29-
- python-version: 3.8
63+
- python-version: "3.8"
3064
tox-env: py38
31-
- python-version: 3.9
65+
- python-version: "3.9"
3266
tox-env: py39
3367
- python-version: "3.10"
3468
tox-env: py310
35-
- python-version: pypy-3.7
69+
- python-version: "pypy-3.7"
3670
tox-env: pypy3
3771
steps:
3872
- name: Handle the code
@@ -62,7 +96,7 @@ jobs:
6296
- name: Install required dependencies
6397
run: |
6498
sudo apt-get -y install libevent-dev krb5-kdc krb5-admin-server libkrb5-dev
65-
python -m pip install --upgrade pip
99+
python3 -m pip install --upgrade pip
66100
pip install tox
67101
68102
- name: Test with tox

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ include = '\.pyi?$'
1919
extend-exclude = '''
2020
'''
2121

22+
[tool.pytest.ini_options]
23+
addopts = "-ra -v"

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,4 @@ alldeps =
8383
%(sasl)s
8484
%(docs)s
8585

86-
[tool:pytest]
87-
addopts = -ra -v
8886

0 commit comments

Comments
 (0)