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

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-02-20 11:10:54 +01:00 committed by GitHub
parent 62c402872a
commit b1a6a5a1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1076 additions and 5 deletions

View file

@ -311,17 +311,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.6.0",
"cypress": "^13.6.4",
"cypress-axe": "^1.5.0",
"cypress-split": "^1.20.1",
"jsdom": "^24.0.0",
"ldap-server-mock": "^6.0.1",
"lightningcss": "^1.23.0",

File diff suppressed because it is too large Load diff