Skip to content

Commit ac3b45a

Browse files
committed
feat: create config for linter checks
1 parent 3d8c93b commit ac3b45a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pythonapp.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Python application
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code to check
11+
uses: actions/checkout@v1
12+
- name: Set up Python 3.x
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: "3.x"
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
# Install all necessary packages, including dev dependencies.
20+
pip install -e ."[dev]"
21+
- name: Lint with flake8
22+
run: |
23+
# exit-zero treats all errors as warnings.
24+
flake8 .
25+
- name: Test with unittest
26+
run: |
27+
python -m unittest discover -s tests/
28+
- name: Check format with black
29+
run: |
30+
# Check all python files to see if black would format them.
31+
# If black would format them, then the check fails.
32+
black --check **/*.py

0 commit comments

Comments
 (0)