ci: run ui tests parallely (#2232)

* ci: run ui tests parallely

* ci: run ui tests parallely

* ci: run ui tests parallely
This commit is contained in:
Jannat Patel
2026-03-19 17:20:48 +05:30
committed by GitHub
parent 1e646e35a2
commit 9b8721fa87
4 changed files with 1487 additions and 17 deletions
+13 -3
View File
@@ -1,4 +1,4 @@
name: UI
name: UI Tests
on:
pull_request:
@@ -16,13 +16,14 @@ permissions:
jobs:
test:
name: UI Tests (Cypress) - ${{ matrix.containers }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
name: UI Tests (Cypress)
matrix:
containers: [1, 2]
services:
mariadb:
@@ -114,6 +115,15 @@ jobs:
env:
CYPRESS_BASE_URL: http://lms.test:8000
CYPRESS_RECORD_KEY: 095366ec-7b9f-41bd-aeec-03bb76d627fe
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
- name: Upload Cypress screenshots if tests fail
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots-${{ matrix.containers }}
path: cypress/screenshots
- name: Stop server and wait for coverage file
run: |
+8
View File
@@ -1,4 +1,5 @@
import { defineConfig } from "cypress";
import cypressSplit from "cypress-split";
export default defineConfig({
projectId: "vandxn",
@@ -14,5 +15,12 @@ export default defineConfig({
},
e2e: {
baseUrl: "http://pertest:8000",
setupNodeEvents(on, config) {
// Splitting tests only works when Cypress Cloud is not orchestrating parallel runs.
if (process.env.CYPRESS_CLOUD_PARALLEL !== "1") {
cypressSplit(on, config);
}
return config;
},
},
});
+2 -1
View File
@@ -29,7 +29,8 @@
"@semantic-release/git": "^10.0.1",
"cypress": "^14.5.4",
"cypress-file-upload": "^5.0.8",
"cypress-real-events": "^1.14.0"
"cypress-real-events": "^1.14.0",
"cypress-split": "^1.24.28"
},
"dependencies": {
"pre-commit": "^1.2.2"
+1464 -13
View File
File diff suppressed because it is too large Load Diff