ci: run linter
This commit is contained in:
parent
1878a5b4ef
commit
95b34564ec
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -23,6 +23,8 @@ jobs:
|
|||
git config user.email "actions@users.noreply.github.com"
|
||||
- name: Test
|
||||
run: coverage run -m pytest
|
||||
- name: Lint
|
||||
run: make lint
|
||||
- name: Update(master)
|
||||
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
|
||||
env:
|
||||
|
|
|
|||
10
Makefile
10
Makefile
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
default: format
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
PYTHON?=py -3.8
|
||||
else
|
||||
PYTHON?=python3
|
||||
endif
|
||||
|
||||
lint:
|
||||
py -3.8 -m black -t py38 --check --diff .
|
||||
$(PYTHON) -m black -t py38 --check --diff .
|
||||
|
||||
format:
|
||||
py -3.8 -m black -t py38 .
|
||||
$(PYTHON) -m black -t py38 .
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
pytest==6.2.5
|
||||
coverage==5.5
|
||||
black==21.5b2
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user