Skip to content

Commit

Permalink
ci: add github action for test
Browse files Browse the repository at this point in the history
  • Loading branch information
nix6839 committed Mar 13, 2024
1 parent f82dd69 commit 83ed9d1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 83ed9d1

Please sign in to comment.