@@ -2,9 +2,9 @@ name: Tests
22
33on :
44 push :
5- branches : [master, typescript-port ]
5+ branches : [master, v9.0-integration ]
66 pull_request :
7- branches : [master, typescript-port ]
7+ branches : [master, v9.0-integration ]
88 workflow_dispatch :
99
1010jobs :
5151 fail-fast : false
5252 matrix :
5353 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' ]
5555 steps :
5656 - name : Checkout repo
5757 uses : actions/checkout@v3
@@ -73,6 +73,100 @@ jobs:
7373 yarn tsc --version
7474 yarn type-tests
7575
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+ uses : actions/setup-node@v3.8.1
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+
76170 test-published-artifact-local :
77171 name : Test Published Artifact (Local) ${{ matrix.example }}
78172
0 commit comments