Skip to content

Commit 807f91e

Browse files
authored
Merge pull request #11 from prodigyeducation/add-ci-linter-checks
feat: create config for linter checks
2 parents 3c9d47e + 8560b4e commit 807f91e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Python CI Checks
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: Check format with black
22+
run: |
23+
# Check all python files to see if black would format them.
24+
# If black would format them, then the check fails.
25+
black --check **/*.py
26+
- name: Lint with flake8
27+
run: |
28+
# exit-zero treats all errors as warnings.
29+
flake8 .
30+
- name: Test with unittest
31+
run: |
32+
python -m unittest discover -s tests/

0 commit comments

Comments
 (0)