Skip to content

Commit ef0b7a8

Browse files
committed
Run against RTK examples
1 parent a0c7a4b commit ef0b7a8

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/test.yml

+59
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,65 @@ jobs:
9797
- name: Run are-the-types-wrong
9898
run: npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs no-resolution
9999

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@v2
113+
114+
- name: Use node ${{ matrix.node }}
115+
uses: actions/setup-node@v2
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 out v2.0-integration
124+
working-directory: ./redux-toolkit
125+
run: git checkout v2.0-integration
126+
127+
- name: Check folder contents
128+
run: ls -l .
129+
130+
- name: Install deps
131+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
132+
run: yarn install
133+
134+
- uses: actions/download-artifact@v2
135+
with:
136+
name: package
137+
path: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
138+
139+
- name: Check folder contents
140+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
141+
run: ls -l .
142+
143+
- name: Install build artifact
144+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
145+
run: yarn add ./package.tgz
146+
147+
- name: Show installed package versions
148+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
149+
run: yarn info reselect && yarn why reselect
150+
151+
- name: Build example
152+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
153+
run: yarn build
154+
155+
- name: Run test step
156+
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
157+
run: yarn test
158+
100159
test-published-artifact-local:
101160
name: Test Published Artifact (Local) ${{ matrix.example }}
102161

0 commit comments

Comments
 (0)