File tree Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 18
18
filters : |
19
19
toolkit:
20
20
- 'packages/toolkit/**'
21
+ - 'examples/publish-ci/**'
22
+ - '.github/workflows/tests.yml'
21
23
22
24
build :
23
25
needs : changes
@@ -127,3 +129,49 @@ jobs:
127
129
run : |
128
130
yarn tsc --version
129
131
yarn type-tests
132
+
133
+ test-published-artifact :
134
+ name : Test Published Artifact ${{ matrix.example }}
135
+
136
+ needs : [build]
137
+ runs-on : ubuntu-latest
138
+ strategy :
139
+ fail-fast : false
140
+ matrix :
141
+ node : ['16.x']
142
+ example : ['cra5']
143
+ defaults :
144
+ run :
145
+ working-directory : ./examples/publish-ci/${{ matrix.example }}
146
+ steps :
147
+ - name : Checkout repo
148
+ uses : actions/checkout@v2
149
+
150
+ - name : Use node ${{ matrix.node }}
151
+ uses : actions/setup-node@v2
152
+ with :
153
+ node-version : ${{ matrix.node }}
154
+ cache : ' yarn'
155
+
156
+ - name : Install deps
157
+ run : yarn install
158
+
159
+ - name : Remove existing RTK
160
+ run : yarn remove @reduxjs/toolkit
161
+
162
+ - uses : actions/download-artifact@v2
163
+ with :
164
+ name : package
165
+ path : ./examples/publish-ci/${{ matrix.example }}
166
+
167
+ - name : Check folder contents
168
+ run : ls -l .
169
+
170
+ - name : Install RTK build artifact
171
+ run : yarn add ./package.tgz
172
+
173
+ - name : Build example
174
+ run : yarn build
175
+
176
+ - name : Run Playwright test
177
+ run : yarn test
Original file line number Diff line number Diff line change 14
14
"scripts" : {
15
15
"start" : " react-scripts start" ,
16
16
"build" : " react-scripts build" ,
17
- "test" : " react-scripts test" ,
18
17
"eject" : " react-scripts eject" ,
19
18
"serve-app" : " yarn serve -s build" ,
20
- "test-playwright " : " yarn playwright test" ,
19
+ "test" : " yarn playwright test" ,
21
20
"format" : " prettier --write \" ./src/**/*.{ts,tsx}\" \" **/*.md\" "
22
21
},
23
22
"eslintConfig" : {
You can’t perform that action at this time.
0 commit comments