Skip to content

Commit cdfd494

Browse files
committed
Fix CI
1 parent c3194c6 commit cdfd494

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
# Remove config line that points "reselect" to the `src` folder,
8585
# so that the typetest will use the installed version instead
8686
- name: Erase path aliases
87-
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json vitest.config.mts
87+
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json
8888

8989
- name: Test types
9090
run: |
@@ -227,7 +227,7 @@ jobs:
227227
run: yarn add ./package.tgz
228228

229229
- name: Erase path aliases
230-
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
230+
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json
231231

232232
- name: Run local tests against the build artifact
233-
run: yarn test
233+
run: yarn test --mode test-ci

vitest.config.mts

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

3-
export default defineConfig({
3+
export default defineConfig(({ mode }) => ({
44
test: {
55
watch: false,
66
globals: true,
77
setupFiles: ['test/setup.ts'],
88
alias: {
9-
reselect: new URL('src/index.ts', import.meta.url).pathname, // @remap-prod-remove-line
9+
reselect: new URL(
10+
mode === 'test-ci' ? 'node_modules/reselect' : 'src/index.ts',
11+
import.meta.url
12+
).pathname,
1013

1114
// 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
1215
'@internal': new URL('src', import.meta.url).pathname
1316
}
1417
}
15-
})
18+
}))

0 commit comments

Comments
 (0)