Skip to content

Commit

Permalink
Use actual attw CLI and handle Node18 + CRA4
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Nov 23, 2023
1 parent c609eb7 commit 2b7af71
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,28 @@ jobs:
yarn test:typecheck
yarn test:types
are-the-types-wrong:
name: Check package config with are-the-types-wrong

needs: [build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['18.x']
steps:
- name: Checkout repo
uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: package
path: .

# Note: We currently expect "FalseCJS" failures for Node16 + `moduleResolution: "node16"
- name: Run are-the-types-wrong
run: npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs

test-published-artifact:
name: Test Published Artifact ${{ matrix.example }}

Expand All @@ -141,16 +163,7 @@ jobs:
fail-fast: false
matrix:
node: ['18.x']
example:
[
'cra4',
'cra5',
'next',
'vite',
'node-standard',
'node-esm',
'are-the-types-wrong'
]
example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm']
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -190,15 +203,8 @@ jobs:

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

- name: Run test step
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: yarn test
if: matrix.example != 'are-the-types-wrong'

- name: Run test step
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
# Ignore "FalseCJS" errors in the `attw` job
run: yarn test -n FalseCJS
if: matrix.example == 'are-the-types-wrong'

0 comments on commit 2b7af71

Please sign in to comment.