Skip to content

Commit 492bf78

Browse files
committed
Fix CI
1 parent cdfd494 commit 492bf78

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/build-and-test-types.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ jobs:
8787
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json
8888

8989
- name: Test types
90+
env:
91+
TEST_DIST: true
9092
run: |
9193
yarn tsc --version
9294
yarn type-tests
@@ -230,4 +232,6 @@ jobs:
230232
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json
231233

232234
- name: Run local tests against the build artifact
233-
run: yarn test --mode test-ci
235+
env:
236+
TEST_DIST: true
237+
run: yarn test

vitest.config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { defineConfig } from 'vitest/config'
22

3-
export default defineConfig(({ mode }) => ({
3+
export default defineConfig({
44
test: {
55
watch: false,
66
globals: true,
77
setupFiles: ['test/setup.ts'],
88
alias: {
99
reselect: new URL(
10-
mode === 'test-ci' ? 'node_modules/reselect' : 'src/index.ts',
10+
process.env.TEST_DIST ? 'node_modules/reselect' : 'src/index.ts',
1111
import.meta.url
1212
).pathname,
1313

1414
// this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest
1515
'@internal': new URL('src', import.meta.url).pathname
1616
}
1717
}
18-
}))
18+
})

0 commit comments

Comments
 (0)