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 1818 filters : |
1919 toolkit:
2020 - 'packages/toolkit/**'
21+ - 'examples/publish-ci/**'
22+ - '.github/workflows/tests.yml'
2123
2224 build :
2325 needs : changes
@@ -127,3 +129,49 @@ jobs:
127129 run : |
128130 yarn tsc --version
129131 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 1414 "scripts" : {
1515 "start" : " react-scripts start" ,
1616 "build" : " react-scripts build" ,
17- "test" : " react-scripts test" ,
1817 "eject" : " react-scripts eject" ,
1918 "serve-app" : " yarn serve -s build" ,
20- "test-playwright " : " yarn playwright test" ,
19+ "test" : " yarn playwright test" ,
2120 "format" : " prettier --write \" ./src/**/*.{ts,tsx}\" \" **/*.md\" "
2221 },
2322 "eslintConfig" : {
You can’t perform that action at this time.
0 commit comments