Refactor PR checks

This commit is contained in:
Edoardo Pirovano 2021-09-02 15:12:31 +01:00
parent 7128833392
commit 444316b6c6
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
33 changed files with 1677 additions and 870 deletions

25
.github/workflows/script/verify-pr-checks.sh vendored Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
set -eu
# Sanity check that repo is clean to start with
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then this workflow needs attention...
>&2 echo "Failed: Repo should be clean before testing!"
exit 1
fi
# Wipe the generated PR checks in case there are extra unnecessary files in there
rm -rf .github/workflows/__*
# Generate the PR checks
cd pr-checks && python3 sync.py
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
git diff
git status
>&2 echo "Failed: PR checks are not up to date. Run 'cd pr-checks && python3 sync.py' to update"
exit 1
fi
echo "Success: PR checks are up to date"