Run Cypress tests in parallel using cypress-split
(#20685)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
62c402872a
commit
b1a6a5a1b0
4 changed files with 1076 additions and 5 deletions
7
.github/workflows/js-ci.yml
vendored
7
.github/workflows/js-ci.yml
vendored
|
@ -311,17 +311,14 @@ jobs:
|
||||||
uses: cypress-io/github-action@v6
|
uses: cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
install: false
|
install: false
|
||||||
record: true
|
|
||||||
parallel: true
|
|
||||||
group: ${{ matrix.browser }}
|
|
||||||
browser: ${{ matrix.browser }}
|
browser: ${{ matrix.browser }}
|
||||||
wait-on: http://localhost:8080
|
wait-on: http://localhost:8080
|
||||||
working-directory: js/apps/admin-ui
|
working-directory: js/apps/admin-ui
|
||||||
env:
|
env:
|
||||||
CYPRESS_BASE_URL: http://localhost:8080/admin/
|
CYPRESS_BASE_URL: http://localhost:8080/admin/
|
||||||
CYPRESS_KEYCLOAK_SERVER: http://localhost:8080
|
CYPRESS_KEYCLOAK_SERVER: http://localhost:8080
|
||||||
CYPRESS_RECORD_KEY: b8f1d15e-eab8-4ee7-8e44-c6d7cd8fc0eb
|
SPLIT: ${{ strategy.job-total }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
SPLIT_INDEX: ${{ strategy.job-index }}
|
||||||
|
|
||||||
- name: Upload server logs
|
- name: Upload server logs
|
||||||
if: always()
|
if: always()
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { defineConfig } from "cypress";
|
import { defineConfig } from "cypress";
|
||||||
|
import cypressSplit from "cypress-split";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
projectId: "j4yhox",
|
projectId: "j4yhox",
|
||||||
|
@ -17,5 +18,9 @@ export default defineConfig({
|
||||||
baseUrl: "http://localhost:8080",
|
baseUrl: "http://localhost:8080",
|
||||||
slowTestThreshold: 30000,
|
slowTestThreshold: 30000,
|
||||||
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
|
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
cypressSplit(on, config);
|
||||||
|
return config;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
"@vitejs/plugin-react-swc": "^3.6.0",
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||||
"cypress": "^13.6.4",
|
"cypress": "^13.6.4",
|
||||||
"cypress-axe": "^1.5.0",
|
"cypress-axe": "^1.5.0",
|
||||||
|
"cypress-split": "^1.20.1",
|
||||||
"jsdom": "^24.0.0",
|
"jsdom": "^24.0.0",
|
||||||
"ldap-server-mock": "^6.0.1",
|
"ldap-server-mock": "^6.0.1",
|
||||||
"lightningcss": "^1.23.0",
|
"lightningcss": "^1.23.0",
|
||||||
|
|
1068
js/pnpm-lock.yaml
1068
js/pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue