1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Final clean ups.

It works!  So, yes, need refs/remotes/origin/ prepended to the base_ref,
which will always be a branch for a PR.

* Remove debug lines (set -x, etc).
* No need for pytest here as yet.
* Fall back to requirements.txt if no requirements-dev.txt.
This commit is contained in:
Athanasius 2020-07-28 15:39:39 +01:00
parent 648c1af339
commit 629a3461f6

View File

@ -38,19 +38,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip install flake8
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; elif [ -f requirements.txt ]; then pip install -r requirements.txt ; fi
- name: Lint with flake8
env:
BASE_REF: ${{github.base_ref}}
run: |
# Show all commands as run
set -x
git branch
git log | head -100
git diff
# stop the build if there are Python syntax errors or undefined names, ignore existing
git diff "refs/remotes/origin/${BASE_REF}" -- | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --diff
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide