From ea6a05632b12d9972295575a99252e6fbaf74c79 Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Sat, 21 Dec 2024 03:37:20 +0000 Subject: [PATCH] ci: shard vitest to speed up unit test (#9235) --- .github/workflows/build-test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 54835030a3bd3..4fb05573fef45 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -209,6 +209,10 @@ jobs: - build-native env: DISTRIBUTION: web + strategy: + fail-fast: false + matrix: + shard: [1, 2, 3, 4, 5] steps: - uses: actions/checkout@v4 - name: Setup Node.js @@ -225,7 +229,7 @@ jobs: path: ./packages/frontend/native - name: Unit Test - run: yarn test:coverage + run: yarn test:coverage --shard=${{ matrix.shard }}/${{ strategy.job-total }} - name: Upload unit test coverage results uses: codecov/codecov-action@v5