Skip to content

Commit

Permalink
Speed up the tests
Browse files Browse the repository at this point in the history
Due to the property tests, Jest takes a little while to run. This change splits it into multiple jobs, similar to the integration tests.

Refs #976, https://jestjs.io/docs/next/cli#--shard
  • Loading branch information
thewilkybarkid committed Jun 2, 2023
1 parent 614f97c commit 460ad81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,14 @@ jobs:
run: npm run lint

test:
name: 'Test'
name: 'Test (${{ matrix.shard }}/${{ strategy.job-total }})'
runs-on: ubuntu-22.04
needs:
- build-assets
strategy:
fail-fast: false
matrix:
shard: [1, 2]

steps:
- name: 'Checkout code'
Expand All @@ -152,7 +156,7 @@ jobs:
path: src

- name: 'Run the tests'
run: npm run test
run: npm run test -- --shard=${{ matrix.shard }}/${{ strategy.job-total }}

test-integration:
name: 'Integration test (${{ matrix.shard }}/${{ strategy.job-total }})'
Expand Down

0 comments on commit 460ad81

Please sign in to comment.