6868 fallbackNpm : ' ^11.3'
6969
7070 - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
71- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3 .0
71+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4 .0
7272 with :
7373 node-version : ${{ steps.versions.outputs.nodeVersion }}
7474
8181 TESTING=true npm run build --if-present
8282
8383 - name : Save context
84- uses : actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
84+ uses : actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
8585 with :
8686 key : cypress-context-${{ github.run_id }}
8787 path : ./
@@ -93,42 +93,39 @@ jobs:
9393 strategy :
9494 fail-fast : false
9595 matrix :
96- # Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
97- containers : [0, 1, 2, 3, 4, 5, 6, 7]
98- # Hack as strategy.job-total includes the component and GitHub does not allow math expressions
99- # Always align this number with the total of e2e runners (max. index + 1)
100- total-containers : [8]
96+ # Run multiple copies of the current job in parallel
97+ # Please increase the number or runners as your tests suite grows
98+ containers : ['component', '1', '2', '3']
10199
102100 name : runner ${{ matrix.containers }}
103101
104102 steps :
105103 - name : Restore context
106- uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
104+ uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
107105 with :
108106 fail-on-cache-miss : true
109107 key : cypress-context-${{ github.run_id }}
110108 path : ./
111109
112110 - name : Set up node ${{ needs.init.outputs.nodeVersion }}
113- uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3 .0
111+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4 .0
114112 with :
115113 node-version : ${{ needs.init.outputs.nodeVersion }}
116114
117115 - name : Set up npm ${{ needs.init.outputs.npmVersion }}
118116 run : npm i -g 'npm@${{ needs.init.outputs.npmVersion }}'
119117
120- - name : Install cypress
121- run : ./node_modules/cypress/bin/cypress install
122-
123118 - name : Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
124119 uses : cypress-io/github-action@783cb3f07983868532cabaedaa1e6c00ff4786a8 # v7.1.9
125120 with :
126- # We already installed the dependencies in the init job
127- install : false
121+ record : ${{ secrets.CYPRESS_RECORD_KEY && true }}
122+ parallel : ${{ secrets.CYPRESS_RECORD_KEY && true }}
128123 # cypress run type
129124 component : ${{ matrix.containers == 'component' }}
130- # Do not add Cypress record key config as this conflicts with cypress-split
131- # Cypress again tries to force users to buy their dashboard...
125+ group : ${{ secrets.CYPRESS_RECORD_KEY && env.CYPRESS_GROUP }}
126+ # cypress env
127+ ci-build-id : ${{ secrets.CYPRESS_RECORD_KEY && env.CYPRESS_BUILD_ID }}
128+ tag : ${{ secrets.CYPRESS_RECORD_KEY && github.event_name }}
132129 env :
133130 # Needs to be prefixed with CYPRESS_
134131 CYPRESS_BRANCH : ${{ env.BRANCH }}
@@ -137,11 +134,12 @@ jobs:
137134 # Needed for some specific code workarounds
138135 TESTING : true
139136 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140- SPLIT : ${{ matrix.total-containers }}
141- SPLIT_INDEX : ${{ matrix.containers == 'component' && 0 || matrix.containers }}
137+ CYPRESS_RECORD_KEY : ${{ secrets.CYPRESS_RECORD_KEY }}
138+ CYPRESS_BUILD_ID : ${{ github.sha }}-${{ github.run_number }}
139+ CYPRESS_GROUP : Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }}
142140
143141 - name : Upload snapshots
144- uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
142+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
145143 if : always()
146144 with :
147145 name : snapshots_${{ matrix.containers }}
@@ -152,7 +150,7 @@ jobs:
152150 run : docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log
153151
154152 - name : Upload NC logs
155- uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
153+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
156154 if : failure() && matrix.containers != 'component'
157155 with :
158156 name : nc_logs_${{ matrix.containers }}
0 commit comments