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 "
2
2
3
3
on : [push, pull_request]
4
4
@@ -30,10 +30,38 @@ jobs:
30
30
if [ ! -z "$(git status --porcelain)" ]; then
31
31
# If we get a fail here then the PR needs attention
32
32
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
33
+ git status
33
34
exit 1
34
35
fi
35
36
echo "Success: JavaScript files are up to date"
36
37
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
+
37
65
npm-test :
38
66
runs-on : ubuntu-latest
39
67
You can’t perform that action at this time.
0 commit comments