Run Cypress tests in parallel using cypress-split (#20685) (#27199)

Closes #27194

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops
2024-02-21 13:25:28 +01:00
committed by GitHub
parent e44df38908
commit c56a2da3c6
4 changed files with 1098 additions and 5 deletions

View File

@@ -307,17 +307,14 @@ jobs:
uses: cypress-io/github-action@v6
with:
install: false
record: true
parallel: true
group: ${{ matrix.browser }}
browser: ${{ matrix.browser }}
wait-on: http://localhost:8080
working-directory: js/apps/admin-ui
env:
CYPRESS_BASE_URL: http://localhost:8080/admin/
CYPRESS_KEYCLOAK_SERVER: http://localhost:8080
CYPRESS_RECORD_KEY: b8f1d15e-eab8-4ee7-8e44-c6d7cd8fc0eb
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
- name: Upload server logs
if: always()

View File

@@ -1,4 +1,5 @@
import { defineConfig } from "cypress";
import cypressSplit from "cypress-split";
export default defineConfig({
projectId: "j4yhox",
@@ -17,5 +18,9 @@ export default defineConfig({
baseUrl: "http://localhost:8080",
slowTestThreshold: 30000,
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
setupNodeEvents(on, config) {
cypressSplit(on, config);
return config;
},
},
});

View File

@@ -102,6 +102,7 @@
"@vitejs/plugin-react-swc": "^3.5.0",
"cypress": "^13.6.0",
"cypress-axe": "^1.5.0",
"cypress-split": "^1.20.1",
"jsdom": "^22.1.0",
"ldap-server-mock": "^6.0.1",
"lightningcss": "^1.22.1",

1090
js/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff