ci: run linter

This commit is contained in:
NateScarlet 2021-10-10 02:22:34 +08:00
parent 1878a5b4ef
commit 95b34564ec
No known key found for this signature in database
GPG Key ID: 5C242793B070309C
3 changed files with 11 additions and 2 deletions

View File

@ -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:

View File

@ -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 .

View File

@ -1,2 +1,3 @@
pytest==6.2.5
coverage==5.5
black==21.5b2