Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

ci: shard vitest to speed up unit test (#9235)

Saul-Mironeea6a05632b12
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 54835030a3..4fb05573fe 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