Skip to content

Commit

Permalink
Split integration tests into 4 parallel runs
Browse files Browse the repository at this point in the history
  • Loading branch information
froddd committed Oct 24, 2024
1 parent ff0b643 commit 333b3c3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ jobs:
npx nyc report -t ./coverage --reporter=text --reporter=text-summary
npx nyc check-coverage -t ./coverage
# TODO: Split into parallel runs
integration_test:
name: "Integration testing 🧪"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_node_index:
- 0
- 1
- 2
- 3
steps:
- name: Check out code
uses: actions/[email protected]
Expand All @@ -97,17 +104,39 @@ jobs:
- name: Building source
run: npm run build

- uses: actions/download-artifact@v4
with:
name: junit-xml-reports
path: tmp/integration-tests-reports
continue-on-error: true

- uses: r7kamura/split-tests-by-timings@v0
id: split-tests
with:
reports: tmp/integration-tests-reports
glob: integration_tests/tests/**/*.cy.ts
index: ${{ matrix.ci_node_index }}
total: 4

- name: Running Integration tests
run: npm run test:integration
run: |
TEST_RUN_ARGS="--spec $(echo ${{ steps.split-tests.outputs.paths }} | sed -E 's/ /,/g')"
npm run test:integration
- name: Store Integration tests reports
uses: actions/upload-artifact@v4
with:
name: integration-tests-reports
path: test_results/cypress

- name: Store Integration tests results
- name: Store Integration tests videos
uses: actions/upload-artifact@v4
with:
name: integration-tests-results
path: test_results/integration
name: integration-tests-videos
path: integration_tests/videos

- name: Store Integration tests screenshots
uses: actions/upload-artifact@v4
with:
name: integration-tests-screenshots
path: test_results/integration/screenshots
path: integration_tests/screenshots
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test:e2e:local:ui": "npm run test:e2e:local -- --ui",
"install-playwright": "npx playwright install",
"security_audit": "npx audit-ci --config audit-ci.json",
"int-test": "cypress run --config video=false",
"int-test": "cypress run --config video=false $TEST_RUN_ARGS",
"int-test-ui": "cypress open --e2e --browser electron",
"clean": "rm -rf dist build node_modules stylesheets",
"start-test-wiremock": "docker compose -f docker-compose-test.yml up -d",
Expand Down

0 comments on commit 333b3c3

Please sign in to comment.