From dd4fee40051cc4fde51c202db399fcab862fe7db Mon Sep 17 00:00:00 2001 From: calloc134 <115209243+calloc134@users.noreply.github.com> Date: Sun, 2 Feb 2025 21:43:30 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20=E3=83=86=E3=82=B9=E3=83=88=E7=94=A8?= =?UTF-8?q?=E3=81=AEworkflow=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml 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" },