diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-10-22 18:58:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 18:58:39 +0200 |
commit | 91e02fea0babd6dd97cd7302c963c97e1b696cbd (patch) | |
tree | aa2fe0e71b9a2e3c08da6d6874051c34d0c83c8a /.github/workflows | |
parent | 4b70f19837948b797a54bfd39eeff3320db8c40e (diff) | |
parent | 37d53d6b7972862657c3a077dd3c74abda65e966 (diff) | |
download | nextcloud-server-91e02fea0babd6dd97cd7302c963c97e1b696cbd.tar.gz nextcloud-server-91e02fea0babd6dd97cd7302c963c97e1b696cbd.zip |
Merge pull request #41039 from nextcloud/fix/run-cypress-always-parallel
feat(cypress): Always run cypress CI in parallel
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/cypress.yml | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index feac6b03b81..520769e0de3 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -72,15 +72,11 @@ jobs: fail-fast: false matrix: # Run multiple copies of the current job in parallel - # Please increase the number or runners as your tests suite grows - containers: ["component", 1, 2] - # Only use cypress cloud for PRs - use-cypress-cloud: - - ${{ !!github.head_ref }} - # Only use one container if we are not using the cypress cloud. - exclude: - - use-cypress-cloud: false - containers: 2 + # Please increase the number or runners as your tests suite grows (0 based index for e2e tests) + containers: ["component", 0, 1, 2] + # Hack as strategy.job-total includes the component and GitHub does not allow math expressions + # Always aling this number with the total of e2e runners (max. index + 1) + total-containers: [3] name: runner ${{ matrix.containers }} @@ -103,9 +99,6 @@ jobs: - name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests uses: cypress-io/github-action@59810ebfa5a5ac6fcfdcfdf036d1cd4d083a88f2 # v6.5.0 with: - record: ${{ !!matrix.use-cypress-cloud }} - parallel: ${{ !!matrix.use-cypress-cloud }} - # cypress run type component: ${{ matrix.containers == 'component' }} group: ${{ matrix.use-cypress-cloud && matrix.containers == 'component' && 'Run component' || matrix.use-cypress-cloud && 'Run E2E' || '' }} # cypress env @@ -120,6 +113,8 @@ jobs: TESTING: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + SPLIT: ${{ matrix.total-containers }} + SPLIT_INDEX: ${{ matrix.containers == 'component' && 0 || matrix.containers }} - name: Upload snapshots uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 |