Skip to content

Commit

Permalink
feat: enable jest tests sharding
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron committed Feb 5, 2025
1 parent 6e5b4e1 commit 63f83c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pr-tests-jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ concurrency:

jobs:
tests-jest:
name: Test
name: Jest Tests [Shard ${{ matrix.shard }}]
runs-on: buildjet-8vcpu-ubuntu-2204-arm
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7 , 8]
steps:
- uses: actions/checkout@v4
- uses: FuelLabs/github-actions/setups/node@master
Expand All @@ -36,12 +40,10 @@ jobs:
id: findPr

- name: Build libs
run: |
pnpm build:libs --concurrency=100%
run: pnpm build:libs --concurrency=100%

- name: Run Jest Tests
run: |
pnpm test:ci
run: pnpm test:ci --shard ${{ matrix.shard }}/4
timeout-minutes: 10

- name: Stop Test Node
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev:storybook": "storybook dev -p 6006",
"preview": "vite preview",
"test": "jest --verbose",
"test:ci": "pnpm ts:check && pnpm test",
"test:ci": "pnpm ts:check && jest --verbose",
"test:watch": "jest --watch",
"ts:check": "pnpm xstate:typegen && tsc --noEmit",
"xstate:typegen": "xstate typegen 'src/**/*.ts?(x)'"
Expand Down

0 comments on commit 63f83c0

Please sign in to comment.