1616jobs :
1717 init :
1818 runs-on : ubuntu-latest
19+ outputs :
20+ nodeVersion : ${{ steps.versions.outputs.nodeVersion }}
21+ npmVersion : ${{ steps.versions.outputs.npmVersion }}
1922
2023 steps :
2124 - name : Checkout app
22- uses : actions/checkout@v3
25+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2326
2427 - name : Read package.json node and npm engines version
25- uses : skjnldsv/read-package-engines-version-actions@v1 .1
28+ uses : skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2 .1
2629 id : versions
2730 with :
2831 fallbackNode : " ^12"
2932 fallbackNpm : " ^6"
3033
3134 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
32- uses : actions/setup-node@v3
35+ uses : actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
3336 with :
37+ cache : ' npm'
3438 node-version : ${{ steps.versions.outputs.nodeVersion }}
3539
3640 - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
@@ -42,10 +46,10 @@ jobs:
4246 TESTING=true npm run build --if-present
4347
4448 - name : Save context
45- uses : actions/cache@v3
49+ uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
4650 with :
4751 key : cypress-context-${{ github.run_id }}
48- path : /home/runner/work/viewer
52+ path : ./
4953
5054 cypress :
5155 runs-on : ubuntu-latest
@@ -61,16 +65,26 @@ jobs:
6165
6266 steps :
6367 - name : Restore context
64- uses : actions/cache@v3
68+ uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
6569 with :
70+ fail-on-cache-miss : true
6671 key : cypress-context-${{ github.run_id }}
67- path : /home/runner/work/viewer
72+ path : ./
73+
74+ - name : Set up node ${{ needs.init.outputs.nodeVersion }}
75+ uses : actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
76+ with :
77+ cache : ' npm'
78+ node-version : ${{ needs.init.outputs.nodeVersion }}
79+
80+ - name : Set up npm ${{ needs.init.outputs.npmVersion }}
81+ run : npm i -g npm@"${{ needs.init.outputs.npmVersion }}"
6882
6983 - name : Pull server image
7084 run : docker pull ghcr.io/nextcloud/continuous-integration-shallow-server
7185
7286 - name : Run E2E cypress tests
73- uses : cypress-io/github-action@v4
87+ uses : cypress-io/github-action@db1693016f23ccf9043f4b2428f9b04e5d502a73 # v5.8.1
7488 with :
7589 record : true
7690 parallel : true
88102 CYPRESS_RECORD_KEY : ${{ secrets.CYPRESS_RECORD_KEY }}
89103
90104 - name : Upload snapshots
91- uses : actions/upload-artifact@v3
105+ uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
92106 if : always()
93107 with :
94108 name : snapshots
0 commit comments