Skip to content

Commit f09ea8f

Browse files
committed
Add mypy and black to CI
1 parent 4dd9398 commit f09ea8f

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ name: "CI"
22
on: "push"
33
jobs:
44
lint:
5-
name: "🐍 Test Python modules"
5+
name: "🐍 Lint Python modules"
66
runs-on: "ubuntu-latest"
77
strategy:
88
matrix:
99
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
10-
dependencies: ["", "colorama"]
1110
steps:
1211
- uses: "actions/checkout@master"
1312
- name: "🐍 Set up Python ${{ matrix.python-version }}"
@@ -17,9 +16,30 @@ jobs:
1716
- name: "🐍 Display Python version"
1817
run: "python --version"
1918
- name: "🐍 Install dependencies"
20-
run: "python -m pip install --user flake8 pytest ${{ matrix.dependencies }}"
19+
run: "python -m pip install --user black flake8 mypy"
20+
- name: "🐍 Run mypy"
21+
run: "python -m mypy ."
2122
- name: "🐍 Run flake8"
2223
run: "python -m flake8"
24+
- name: "🐍 Run black"
25+
run: "python -m black --check ."
26+
test:
27+
name: "🐍 Test Python modules"
28+
runs-on: "ubuntu-latest"
29+
strategy:
30+
matrix:
31+
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
32+
dependencies: ["", "colorama"]
33+
steps:
34+
- uses: "actions/checkout@master"
35+
- name: "🐍 Set up Python ${{ matrix.python-version }}"
36+
uses: "actions/setup-python@v2"
37+
with:
38+
python-version: "${{ matrix.python-version }}"
39+
- name: "🐍 Display Python version"
40+
run: "python --version"
41+
- name: "🐍 Install dependencies"
42+
run: "python -m pip install --user pytest ${{ matrix.dependencies }}"
2343
- name: "🐍 Run pytest"
2444
run: "python -m pytest"
2545
publish:

0 commit comments

Comments
Β (0)