5656 JS_SDK_GITHUB_BASE_REF : ${{ inputs.matrix-js-sdk-sha }}
5757
5858 - name : Jest Cache
59- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
59+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
6060 with :
6161 path : /tmp/jest_cache
6262 key : ${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -100,7 +100,7 @@ jobs:
100100
101101 complete :
102102 name : jest-tests
103- needs : [jest_ew, vitest_sc ]
103+ needs : [jest_ew, vitest ]
104104 if : always()
105105 runs-on : ubuntu-24.04
106106 permissions :
@@ -120,8 +120,13 @@ jobs:
120120 sha : ${{ github.sha }}
121121 target_url : https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
122122
123- vitest_sc :
124- name : Vitest (Shared Components)
123+ vitest :
124+ name : Vitest
125+ strategy :
126+ matrix :
127+ package :
128+ - shared-components
129+ - module-api
125130 runs-on : ubuntu-24.04
126131 steps :
127132 - name : Checkout code
@@ -137,32 +142,32 @@ jobs:
137142 node-version : " lts/*"
138143 cache : " pnpm"
139144
140- - name : Install Shared Component Deps
141- working-directory : " packages/shared-components"
145+ - name : Install Deps
142146 run : " pnpm install"
143147
144148 - name : Cache storybook & vitest
145- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
149+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
146150 with :
147151 path : |
148- packages/shared-components /node_modules/.cache
149- packages/shared-components /node_modules/.vite/vitest
152+ packages/${{ matrix.package }} /node_modules/.cache
153+ packages/${{ matrix.package }} /node_modules/.vite/vitest
150154 key : ${{ hashFiles('pnpm-lock.yaml') }}
151155
152156 - name : Setup playwright
153157 uses : ./.github/actions/setup-playwright
158+ if : matrix.package == 'shared-components'
154159 with :
155160 write-cache : ${{ github.event_name != 'merge_group' }}
156161
157162 - name : Run tests
158- working-directory : " packages/shared-components "
163+ working-directory : " packages/${{ matrix.package }} "
159164 run : pnpm test:unit --coverage=$ENABLE_COVERAGE
160165
161166 - name : Upload Artifact
162167 if : env.ENABLE_COVERAGE == 'true'
163168 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
164169 with :
165- name : coverage-sharedcomponents
170+ name : coverage-${{ matrix.package }}
166171 path : |
167- packages/shared-components /coverage
168- !packages/shared-components /coverage/lcov-report
172+ packages/${{ matrix.package }} /coverage
173+ !packages/${{ matrix.package }} /coverage/lcov-report
0 commit comments