Skip to content

Commit 2b7af71

Browse files
committed
Use actual attw CLI and handle Node18 + CRA4
1 parent c609eb7 commit 2b7af71

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

.github/workflows/test.yaml

+24-18
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,28 @@ jobs:
132132
yarn test:typecheck
133133
yarn test:types
134134
135+
are-the-types-wrong:
136+
name: Check package config with are-the-types-wrong
137+
138+
needs: [build]
139+
runs-on: ubuntu-latest
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
node: ['18.x']
144+
steps:
145+
- name: Checkout repo
146+
uses: actions/checkout@v3
147+
148+
- uses: actions/download-artifact@v3
149+
with:
150+
name: package
151+
path: .
152+
153+
# Note: We currently expect "FalseCJS" failures for Node16 + `moduleResolution: "node16"
154+
- name: Run are-the-types-wrong
155+
run: npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs
156+
135157
test-published-artifact:
136158
name: Test Published Artifact ${{ matrix.example }}
137159

@@ -141,16 +163,7 @@ jobs:
141163
fail-fast: false
142164
matrix:
143165
node: ['18.x']
144-
example:
145-
[
146-
'cra4',
147-
'cra5',
148-
'next',
149-
'vite',
150-
'node-standard',
151-
'node-esm',
152-
'are-the-types-wrong'
153-
]
166+
example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm']
154167
steps:
155168
- name: Checkout repo
156169
uses: actions/checkout@v2
@@ -190,15 +203,8 @@ jobs:
190203

191204
- name: Build example
192205
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
193-
run: yarn build
206+
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
194207

195208
- name: Run test step
196209
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
197210
run: yarn test
198-
if: matrix.example != 'are-the-types-wrong'
199-
200-
- name: Run test step
201-
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
202-
# Ignore "FalseCJS" errors in the `attw` job
203-
run: yarn test -n FalseCJS
204-
if: matrix.example == 'are-the-types-wrong'

0 commit comments

Comments
 (0)