Merge pull request #308 from YuviGold/makefile-python-var

Add PYTHON variable to Makefile
This commit is contained in:
Luke Weiler
2020-10-21 21:27:15 -04:00
committed by GitHub
2 changed files with 25 additions and 23 deletions

View File

@@ -4,7 +4,6 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
@@ -13,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: "3.x"
- uses: actions/cache@v1
with:
@@ -24,8 +23,7 @@ jobs:
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install -r dev-requirements.txt
run: make deps
- name: Linter
run: make lint

View File

@@ -1,11 +1,15 @@
IGNORE_ERRORS = E501,F401,F403,F405
PKG = mathgenerator
PYTHON ?= python3
deps:
$(PYTHON) -m pip install --user -r dev-requirements.txt
format:
python -m autopep8 --ignore=$(IGNORE_ERRORS) -ir $(PKG)/*
$(PYTHON) -m autopep8 --ignore=$(IGNORE_ERRORS) -ir $(PKG)/*
lint:
python -m flake8 --ignore=$(IGNORE_ERRORS) $(PKG)
$(PYTHON) -m flake8 --ignore=$(IGNORE_ERRORS) $(PKG)
test:
python -m pytest --verbose -s tests
$(PYTHON) -m pytest --verbose -s tests