diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..03227a7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: Vitest CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: latest + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: latest + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Run tests + run: pnpm test diff --git a/package.json b/package.json index 73a4595..903ff1a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc -b && vite build", + "test": "vitest", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" },