mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Merge pull request #308 from YuviGold/makefile-python-var
Add PYTHON variable to Makefile
This commit is contained in:
6
.github/workflows/tests.yaml
vendored
6
.github/workflows/tests.yaml
vendored
@@ -4,7 +4,6 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -13,7 +12,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: "3.x"
|
||||||
|
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
@@ -24,8 +23,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: make deps
|
||||||
pip install -r dev-requirements.txt
|
|
||||||
|
|
||||||
- name: Linter
|
- name: Linter
|
||||||
run: make lint
|
run: make lint
|
||||||
|
|||||||
10
Makefile
10
Makefile
@@ -1,11 +1,15 @@
|
|||||||
IGNORE_ERRORS = E501,F401,F403,F405
|
IGNORE_ERRORS = E501,F401,F403,F405
|
||||||
PKG = mathgenerator
|
PKG = mathgenerator
|
||||||
|
PYTHON ?= python3
|
||||||
|
|
||||||
|
deps:
|
||||||
|
$(PYTHON) -m pip install --user -r dev-requirements.txt
|
||||||
|
|
||||||
format:
|
format:
|
||||||
python -m autopep8 --ignore=$(IGNORE_ERRORS) -ir $(PKG)/*
|
$(PYTHON) -m autopep8 --ignore=$(IGNORE_ERRORS) -ir $(PKG)/*
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
python -m flake8 --ignore=$(IGNORE_ERRORS) $(PKG)
|
$(PYTHON) -m flake8 --ignore=$(IGNORE_ERRORS) $(PKG)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
python -m pytest --verbose -s tests
|
$(PYTHON) -m pytest --verbose -s tests
|
||||||
|
|||||||
Reference in New Issue
Block a user