diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6226a44 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + node-version: [18, 20] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 8.15.4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + - run: pnpm i --frozen-lockfile -P + + - run: pnpm run test:demo diff --git a/package.json b/package.json index 4b05bc2..00b01e2 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "types": "./index.d.ts", "scripts": { "pub": "release-it", - "test:demo": "cd demo/react && npm run sizecheck" + "test:demo": "cd demo/react && pnpm i && pnpm run sizecheck" }, "dependencies": { "cac": "^6.7.14",