Skip to content

Commit

Permalink
Add Test Matrix (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
charkour authored Mar 10, 2024
1 parent 807683e commit 8ac6dc2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
zustand: [latest, 4.2.0, 4.0.0, 5.0.0-alpha.5]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
Expand All @@ -32,7 +33,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand All @@ -43,6 +44,15 @@ jobs:
- name: Install Dependencies
run: pnpm install

- name: Install Zustand ${{ matrix.zustand }}
run: pnpm add zustand@${{ matrix.zustand }} -w

- name: Patch tsup config
if: ${{ matrix.zustand == '4.0.0' }}
# Patch the tsup config to use `dts: false` for Zustand 4.0.0
run: |
sed -i~ 's/dts: true/dts: false/' tsup.config.ts
- name: Build
run: pnpm run build

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Try a live [demo](https://codesandbox.io/s/currying-flower-2dom9?file=/src/App.t
npm i zustand zundo
```

> zustand v4.3.0 or higher is required for TS usage. v4.0.0 or higher is required for JS usage.
> zustand v4.2.0 or higher is required for TS usage. v4.0.0 or higher is required for JS usage. zundo v2 works with zustand v5.0.0 or higher.
> Node 16 or higher is required.
## Background
Expand Down

0 comments on commit 8ac6dc2

Please sign in to comment.