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
@@ -117,18 +115,17 @@ jobs:
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 }} # zizmor: ignore[secrets-outside-env]
122+ parallel : ${{ secrets.CYPRESS_RECORD_KEY && true }} # zizmor: ignore[secrets-outside-env]
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 }} # zizmor: ignore[secrets-outside-env]
126+ # cypress env
127+ ci-build-id : ${{ secrets.CYPRESS_RECORD_KEY && env.CYPRESS_BUILD_ID }} # zizmor: ignore[secrets-outside-env]
128+ tag : ${{ secrets.CYPRESS_RECORD_KEY && github.event_name }} # zizmor: ignore[secrets-outside-env]
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 }} # zizmor: ignore[secrets-outside-env]
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