File tree Expand file tree Collapse file tree 2 files changed +25
-8
lines changed Expand file tree Collapse file tree 2 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
2
3
- on :
4
- push :
5
- branches : [master]
6
- pull_request :
7
- branches : [master]
3
+ on : [push, pull_request, workflow_dispatch]
8
4
9
5
jobs :
10
6
build :
66
62
- name : Install deps
67
63
run : yarn install
68
64
69
- - uses : actions/download-artifact@v4
65
+ - name : Download build artifact
66
+ uses : actions/download-artifact@v4
70
67
with :
71
68
name : package
72
69
path : .
76
73
- name : Install build artifact
77
74
run : yarn add ./package.tgz
78
75
79
- - run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
76
+ - name : Erase path aliases
77
+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
80
78
81
79
- name : Run tests, against dist
80
+ env :
81
+ TEST_DIST : true
82
82
run : yarn test
83
83
84
84
test-types :
@@ -102,13 +102,27 @@ jobs:
102
102
node-version : ${{ matrix.node }}
103
103
cache : ' yarn'
104
104
105
+ - name : Download build artifact
106
+ uses : actions/download-artifact@v4
107
+ with :
108
+ name : package
109
+ path : .
110
+
105
111
- name : Install deps
106
112
run : yarn install
107
113
108
114
- name : Install TypeScript ${{ matrix.ts }}
109
115
run : yarn add typescript@${{ matrix.ts }}
110
116
117
+ - name : Install build artifact
118
+ run : yarn add ./package.tgz
119
+
120
+ - name : Erase path aliases
121
+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
122
+
111
123
- name : Test types
124
+ env :
125
+ TEST_DIST : true
112
126
run : |
113
127
yarn tsc --version
114
128
yarn type-tests
Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ export default defineConfig({
4
4
test : {
5
5
globals : true ,
6
6
alias : {
7
- 'redux-thunk' : new URL ( 'src/index.ts' , import . meta. url ) . pathname , // @remap -prod-remove-line
7
+ 'redux-thunk' : new URL (
8
+ process . env . TEST_DIST ? 'node_modules/redux-thunk' : 'src/index.ts' ,
9
+ import . meta. url
10
+ ) . pathname ,
8
11
9
12
// 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
10
13
'@internal' : new URL ( 'src' , import . meta. url ) . pathname
You can’t perform that action at this time.
0 commit comments