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 45b64e2
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,69 @@ 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 }}
env:
# Some weird install diffs with cloning this repo and installing.
# Don't care about lockfile diffs, so let it change.
CI: false
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 react-redux && yarn why react-redux

- 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 45b64e2

Please sign in to comment.