Skip to content

Commit

Permalink
lint: add workflow
Browse files Browse the repository at this point in the history
Add the lint workflow which executes flake8 and isort.
  • Loading branch information
VitaliyaIoffe committed Dec 16, 2021
1 parent 6f32691 commit 4433b1c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: flake8

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
- name: Make lint
run: |
make lint
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
index.html : README.md static/skeleton.css static/box.svg static/template.html
pandoc -s README.md -o index.html -c static/skeleton.css --template static/template.html -T mkrepo

.PHONY: lint
lint: flake8 isort

.PHONY: flake8
flake8:
flake8 .

.PHONY: isort
isort:
isort . -c

test :
PYTHONPATH=$(PWD)/test python -m unittest discover -v

Expand Down
2 changes: 2 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flake8>=3.7.9
isort>=5.9.3

0 comments on commit 4433b1c

Please sign in to comment.