@@ -2,9 +2,9 @@ name: Tests
2
2
3
3
on :
4
4
push :
5
- branches : [master, typescript-port ]
5
+ branches : [master, v9.0-integration ]
6
6
pull_request :
7
- branches : [master, typescript-port ]
7
+ branches : [master, v9.0-integration ]
8
8
workflow_dispatch :
9
9
10
10
jobs :
51
51
fail-fast : false
52
52
matrix :
53
53
node : ['16.x']
54
- ts : ['4.7', '4.8', '4.9', '5.0']
54
+ ts : ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2' ]
55
55
steps :
56
56
- name : Checkout repo
57
57
uses : actions/checkout@v3
@@ -73,6 +73,100 @@ jobs:
73
73
yarn tsc --version
74
74
yarn type-tests
75
75
76
+ are-the-types-wrong :
77
+ name : Check package config with are-the-types-wrong
78
+
79
+ needs : [build]
80
+ runs-on : ubuntu-latest
81
+ strategy :
82
+ fail-fast : false
83
+ matrix :
84
+ node : ['16.x']
85
+ steps :
86
+ - name : Checkout repo
87
+ uses : actions/checkout@v3
88
+
89
+ - uses : actions/download-artifact@v3
90
+ with :
91
+ name : package
92
+ path : .
93
+
94
+ # Note: We currently expect "FalseCJS" failures for Node16 + `moduleResolution: "node16",
95
+ # and the `/alternateRenderers" entry point will not resolve under Node10.
96
+ # Skipping these is dangerous, but we'll leave it for now.
97
+ - name : Run are-the-types-wrong
98
+ run : npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs no-resolution
99
+
100
+ test-published-artifact :
101
+ name : Test Published Artifact ${{ matrix.example }}
102
+
103
+ needs : [build]
104
+ runs-on : ubuntu-latest
105
+ strategy :
106
+ fail-fast : false
107
+ matrix :
108
+ node : ['16.x']
109
+ example : ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm']
110
+ steps :
111
+ - name : Checkout repo
112
+ uses : actions/checkout@v4
113
+
114
+ - name : Use node ${{ matrix.node }}
115
+
116
+ with :
117
+ node-version : ${{ matrix.node }}
118
+ cache : ' yarn'
119
+
120
+ - name : Clone RTK repo
121
+ run : git clone https://github.com/reduxjs/redux-toolkit.git ./redux-toolkit
122
+
123
+ - name : Check folder contents
124
+ run : ls -l .
125
+
126
+ # Some weird install diffs with cloning this repo and installing.
127
+ # Just kill the lockfiles for React-Redux and RTK and reinstall
128
+
129
+ - name : Remove React-Redux lockfile
130
+ run : rm yarn.lock && rm package.json
131
+
132
+ - name : Remove RTK lockfile
133
+ working-directory : ./redux-toolkit
134
+ run : rm yarn.lock && rm package.json
135
+
136
+ - name : Install deps
137
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
138
+ run : rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn add msw@latest
139
+
140
+ - name : Install Playwright browser if necessary
141
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
142
+ continue-on-error : true
143
+ run : yarn playwright install
144
+
145
+ - uses : actions/download-artifact@v2
146
+ with :
147
+ name : package
148
+ path : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
149
+
150
+ - name : Check folder contents
151
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
152
+ run : ls -l .
153
+
154
+ - name : Install build artifact
155
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
156
+ run : yarn add ./package.tgz
157
+
158
+ - name : Show installed package versions
159
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
160
+ run : yarn info react-redux && yarn why react-redux
161
+
162
+ - name : Build example
163
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
164
+ run : yarn build
165
+
166
+ - name : Run test step
167
+ working-directory : ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
168
+ run : yarn test
169
+
76
170
test-published-artifact-local :
77
171
name : Test Published Artifact (Local) ${{ matrix.example }}
78
172
0 commit comments