1818 # Adjust APP_NAME if your repository name is different
1919 APP_NAME : ${{ github.event.repository.name }}
2020
21- # Server requires head_ref instead of base_ref, as we want to test the PR branch
21+ # This represents the server branch to checkout.
22+ # Usually it's the base branch of the PR, but for pushes it's the branch itself.
23+ # e.g. 'main', 'stable27' or 'feature/my-feature'
24+ # n.b. server will use head_ref, as we want to test the PR branch.
2225 BRANCH : ${{ github.head_ref || github.ref_name }}
2326
27+
28+ permissions :
29+ contents : read
30+
2431jobs :
2532 init :
2633 runs-on : ubuntu-latest
4350 - name : Checkout server
4451 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4552 with :
53+ persist-credentials : false
4654 # We need to checkout submodules for 3rdparty
4755 submodules : true
4856
6472 fallbackNpm : " ^10"
6573
6674 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
67- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1 .0
75+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
6876 with :
6977 node-version : ${{ steps.versions.outputs.nodeVersion }}
7078
8088 run : npm run cypress:version
8189
8290 - name : Save context
83- uses : buildjet/cache/save@v4
91+ uses : buildjet/cache/save@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
8492 with :
8593 key : cypress-context-${{ github.run_id }}
8694 path : ./
94102 matrix :
95103 # Run multiple copies of the current job in parallel
96104 # Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
97- containers : [" component" , '0', '1', '2', '3', '4', '5', '6', '7']
105+ containers : [' component' , '0', '1', '2', '3', '4', '5', '6', '7']
98106 # Hack as strategy.job-total includes the component and GitHub does not allow math expressions
99107 # Always align this number with the total of e2e runners (max. index + 1)
100108 total-containers : [8]
@@ -103,14 +111,14 @@ jobs:
103111
104112 steps :
105113 - name : Restore context
106- uses : buildjet/cache/restore@v4
114+ uses : buildjet/cache/restore@3e70d19e31d6a8030aeddf6ed8dbe601f94d09f4 # v4.0.2
107115 with :
108116 fail-on-cache-miss : true
109117 key : cypress-context-${{ github.run_id }}
110118 path : ./
111119
112120 - name : Set up node ${{ needs.init.outputs.nodeVersion }}
113- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1 .0
121+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
114122 with :
115123 node-version : ${{ needs.init.outputs.nodeVersion }}
116124
@@ -142,8 +150,8 @@ jobs:
142150 SPLIT : ${{ matrix.total-containers }}
143151 SPLIT_INDEX : ${{ matrix.containers == 'component' && 0 || matrix.containers }}
144152
145- - name : Upload snapshots and videos
146- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
153+ - name : Upload snapshots
154+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
147155 if : always()
148156 with :
149157 name : snapshots_videos_${{ matrix.containers }}
@@ -156,7 +164,7 @@ jobs:
156164 run : docker logs nextcloud-cypress-tests_${{ env.APP_NAME }} > nextcloud.log
157165
158166 - name : Upload NC logs
159- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
167+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
160168 if : failure() && matrix.containers != 'component'
161169 with :
162170 name : nc_logs_${{ matrix.containers }}
@@ -167,7 +175,7 @@ jobs:
167175 run : docker exec nextcloud-cypress-tests_${{ env.APP_NAME }} tar -cvjf - data > data.tar
168176
169177 - name : Upload data dir archive
170- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
178+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
171179 if : failure() && matrix.containers != 'component'
172180 with :
173181 name : nc_data_${{ matrix.containers }}
0 commit comments