Skip to content

Commit

Permalink
Run against RTK examples
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Sep 25, 2023
1 parent a0c7a4b commit ef0b7a8
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,65 @@ jobs:
- name: Run are-the-types-wrong
run: npx @arethetypeswrong/cli ./package.tgz --format table --ignore-rules false-cjs no-resolution

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

needs: [build]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['16.x']
example: ['cra4', 'cra5', 'next', 'vite', 'node-standard', 'node-esm']
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Clone RTK repo
run: git clone https://github.com/reduxjs/redux-toolkit.git ./redux-toolkit

- name: Check out v2.0-integration
working-directory: ./redux-toolkit
run: git checkout v2.0-integration

- name: Check folder contents
run: ls -l .

- name: Install deps
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: yarn install

- uses: actions/download-artifact@v2
with:
name: package
path: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}

- name: Check folder contents
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: ls -l .

- name: Install build artifact
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: yarn add ./package.tgz

- name: Show installed package versions
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: yarn info reselect && yarn why reselect

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

- name: Run test step
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
run: yarn test

test-published-artifact-local:
name: Test Published Artifact (Local) ${{ matrix.example }}

Expand Down

0 comments on commit ef0b7a8

Please sign in to comment.