GitHub workflows: echo info about what we're git diff'ing

Whenever A_D does a PR the checks, for some unclear reason, also contain
'other' files causing unexpected flake8 output.

i.e. PR that changes only plugins/inara.py somehow "git diff .. | flake8"
such that flake8 complains about things in collate.py, coriolis.py,
loadout.py
This commit is contained in:
Athanasius committed 2021-04-12 08:31:47 +01:00
1 parent 878a247604
commit 34d4e72bc4
2 files changed
+6

No files matched your search

+5
View File
@@ -36,6 +36,8 @@ jobs:
BASE_REPO_OWNER: ${{github.event.pull_request.base.repo.owner.login}}
run: |
echo "BASE_REPO_URL: ${BASE_REPO_URL}"
echo "BASE_REPO_OWNER: ${BASE_REPO_OWNER}"
# Add the 'base' repo as a new remote
git remote add ${BASE_REPO_OWNER} ${BASE_REPO_URL}
# And then fetch its references
@@ -70,6 +72,9 @@ jobs:
BASE_REF: ${{github.base_ref}}
run: |
echo "BASE_REPO_URL: ${BASE_REPO_URL}"
echo "BASE_REPO_OWNER: ${BASE_REPO_OWNER}"
echo "BASE_REF: ${BASE_REF}"
# Explicitly check for some errors
# E9 - Runtime (syntax and the like)
# F63 - 'tests' checking
+1
View File
@@ -39,6 +39,7 @@ jobs:
run: |
DATA=$(jq --raw-output .before $GITHUB_EVENT_PATH)
echo "DATA: ${DATA}"
# stop the build if there are Python syntax errors or undefined names, ignore existing
git diff "$DATA" | 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