File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1- name : " Lint, Build & Test "
1+ name : " PR checks "
22
33on : [push, pull_request]
44
@@ -30,10 +30,38 @@ jobs:
3030 if [ ! -z "$(git status --porcelain)" ]; then
3131 # If we get a fail here then the PR needs attention
3232 >&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
33+ git status
3334 exit 1
3435 fi
3536 echo "Success: JavaScript files are up to date"
3637
38+ check-node-modules :
39+ runs-on : ubuntu-latest
40+
41+ steps :
42+ - uses : actions/checkout@v1
43+ - name : Check node modules up to date
44+ run : |
45+ # Sanity check that repo is clean to start with
46+ if [ ! -z "$(git status --porcelain)" ]; then
47+ # If we get a fail here then this workflow needs attention...
48+ >&2 echo "Failed: Repo should be clean before testing!"
49+ exit 1
50+ fi
51+
52+ # Reinstall modules and then clean to remove absolute paths
53+ # Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
54+ npm ci
55+ npm run removeNPMAbsolutePaths
56+ # Check that repo is still clean
57+ if [ ! -z "$(git status --porcelain)" ]; then
58+ # If we get a fail here then the PR needs attention
59+ >&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
60+ git status
61+ exit 1
62+ fi
63+ echo "Success: node_modules are up to date"
64+
3765 npm-test :
3866 runs-on : ubuntu-latest
3967
You can’t perform that action at this time.
0 commit comments