Athanasius
4db2c907df
JSON must have double quotes
2020-07-28 18:01:16 +01:00
Athanasius
9ed541f0e0
No nesting ${{..}}
2020-07-28 17:58:23 +01:00
Athanasius
8b863c5efd
Set array in earlier job using JSON
2020-07-28 17:57:07 +01:00
Athanasius
72c201c5a1
Try contains(['Athanasius'], github.actor)
2020-07-28 17:45:34 +01:00
Athanasius
38150b9603
Check for .git in PY files check.
...
NB: This might cause env.PYFILES checks to fail if they need the var
to at least exist.
2020-07-28 17:37:57 +01:00
Athanasius
91cf47f829
Invert the actor test
2020-07-28 17:32:10 +01:00
Athanasius
8c9dd1b0b1
Remove non-existent dependency
2020-07-28 17:28:55 +01:00
Athanasius
66a2749ebb
Check if a conditional is needed on all steps
...
Basically, if it's only on the first and fails, then do the others
still run ?
2020-07-28 17:27:59 +01:00
Athanasius
2b4f275670
Needs a runs-on for the check_access
2020-07-28 17:15:14 +01:00
Athanasius
e625a85823
Correct syntax
2020-07-28 17:14:27 +01:00
Athanasius
dfb9160248
Don't run flake8_annotate if no access
...
This is using github.actor and checking who it is. If they're not
someone who should have access then use a run with 'exit 1' to fail the
check job.
Then flake8_annotate job needs check_access to have succeeded.
This *will* flag the workflow action as failed if no access, hopefully
it will be obvious why.
Using 'AthanasiusTEST' so it fails for me on this commit/push.
2020-07-28 17:11:16 +01:00
Athanasius
fb7d7ea674
S I N G L E Q U O T E S
2020-07-28 17:02:32 +01:00
Athanasius
ae76059774
Attempt to limit flake8 annotations to Athanasius
2020-07-28 17:01:24 +01:00
Athanasius
12b100fd39
Gurantee exit 0 AND fix the echo
...
* GH Workflows run under "/bin/bash -e", which means if anything in it
fails it all exits immediately. So append " || true" to the egrep.
* The echo to magically set the env var back in the workflow needs to
use "" not '' else the in-shell variable won't interpolate.
2020-07-28 16:42:57 +01:00
Athanasius
67803ec4ea
*.py check should always exit 0
2020-07-28 16:32:06 +01:00
Athanasius
e823b47811
Single quotes then ?
2020-07-28 16:29:42 +01:00
Athanasius
c49231ae36
Try ENV var for passing presence of *.py files
...
This uses <https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#using-workflow-commands-to-access-toolkit-functions >
to set PYFILES env var globally in the job, so should be testable in
the following steps.
2020-07-28 16:25:27 +01:00
Athanasius
ab8ec0fcbb
*.py exit status was inverted
...
That'll teach me for testing with a commit only affecting *.yml files.
2020-07-28 16:10:04 +01:00
Athanasius
0f4ef1623c
Remove extraneous 'needs:'
2020-07-28 16:08:15 +01:00
Athanasius
becb7b2aec
Do *.py check as step in flake8_annotate
...
And make both the 'Annotate with Flake8' and 'Set up Python 3.7' steps
dependent on it.
2020-07-28 16:06:48 +01:00
Athanasius
771ea531ee
Only run flake8 annotation if there are *.py files in diff
2020-07-28 16:02:38 +01:00
Athanasius
8337e41d75
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.
2020-07-28 15:39:39 +01:00
Athanasius
cabaf2c637
See if prepending "refs/remotes/origin/" helps
2020-07-28 15:35:34 +01:00
Athanasius
be98212f8b
Attempt "git diff <branch> --"
...
As in "git diff [<options>] [<commit>] [--] [<path>...]", in case
it's an ambiguity rather than not knowing what 'develop' is.
2020-07-28 15:30:11 +01:00
Athanasius
bb34ba414c
Extra git commands for diagnosis
2020-07-28 15:28:20 +01:00
Athanasius
2b45847793
Try "fetch-depth: 0" on the extra checkouts
2020-07-28 15:23:35 +01:00
Athanasius
70f62668c9
Add 'set -x' to get feedback on all bash commands run
2020-07-28 15:21:26 +01:00
Athanasius
83979337d4
Correct "-name" -> "- name"
2020-07-28 15:19:56 +01:00
Athanasius
b30d57d411
pr-checks: Changed to pull_request and fleshed out
...
* Name all steps
* After checkout@v2 fetch: 1) checkout base_ref, 2) checkout head_ref
* Set and use BASE_REF env var
2020-07-28 15:12:17 +01:00
Athanasius
44fe00a410
Copy push-checks.yml to pr-checks.yml
2020-07-28 15:03:20 +01:00
Athanasius
e645ee5675
Revert "Change the push-checks back into also PRs."
...
This reverts commit 4da1d9df4e .
2020-07-28 15:02:32 +01:00
Athanasius
4da1d9df4e
Change the push-checks back into also PRs.
...
Renamed to suit.
2020-07-28 13:45:55 +01:00
Athanasius
6ba1f77352
Remove greet-everyone workflow, we've gotten things working now
2020-07-26 23:04:37 +01:00
Athanasius
df3f70b7ed
Rename to push-checks.yml, don't do PRs
...
Also commented better at the top
2020-07-26 23:03:23 +01:00
Athanasius
6513db3aca
Don't force --show-source in .flake8 !
...
This was the cause of our flake8-your-pr issue! It meant that as well
as `--format json` giving JSON output it also got polluted with the raw
string of the source line as well.
2020-07-26 23:03:23 +01:00
Athanasius
d65176aed8
Add flake8-json to requirements-dev.txt
2020-07-26 23:03:23 +01:00
Athanasius
8dbb275dca
Specify GITHUB_TOKEN for flake8-your-pr via env
2020-07-26 23:03:23 +01:00
Athanasius
63d44bf8d7
Attempt to run "tayfun/flake8-your-pr@master" in PRs.
2020-07-26 23:03:22 +01:00
Athanasius
333ba24db4
Rename to 'what it runs on' prefix
2020-07-26 23:03:06 +01:00
Athanasius
e461fa62f6
The configuration must be inside a 'with:'
2020-07-26 23:01:10 +01:00
Athanasius
4a3c74ce5b
Use fetch-depth 0 for 'all' on checkout@v2
2020-07-26 23:01:10 +01:00
Athanasius
f41eb4fb92
Try A_D's "diff only" flake8 checking
2020-07-26 23:01:10 +01:00
Athanasius
838e55710d
Uncomment flake8 part of build in workflow
2020-07-26 23:01:10 +01:00
Athanasius
a76aae9737
Remove pytest and comment out flake8 for now.
...
Narrowing down what's working and what isn't in this.
2020-07-26 23:01:10 +01:00
Athanasius
607770f7d4
Add greet-example to github workflows
2020-07-26 20:23:02 +01:00
Athanasius
04fa3fae2c
Update python-app.yml
...
Change to ubuntu-18.04
2020-07-26 18:57:52 +01:00
Athanasius
f7968bd0c8
Update python-app.yml
...
Change name to be more obvious when viewing in Actions.
2020-07-26 18:49:10 +01:00
Athanasius
525baf8b03
Create python-app.yml
...
Add a GitHub Action to check requirements-dev.txt, flake8, and pytest.
2020-07-26 18:27:24 +01:00
A_D
d41dc38162
Create Enhancement issue template
...
closes #599
2020-07-24 13:45:17 +01:00
Athanasius
085333c80b
Update issue templates
2020-07-05 19:46:02 +01:00