From 7dcd7ce0917eaa673e567b11f594e9e380c49490 Mon Sep 17 00:00:00 2001 From: Dallas Hoffman Date: Wed, 30 Oct 2024 21:04:32 -0400 Subject: [PATCH] Add workflow to test pull requests --- .github/workflows/test-pr.yml | 17 +++++++++++++++++ package.json | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/test-pr.yml diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 0000000..f4e4a7c --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,17 @@ +name: Test pull request +on: + pull_request: + branches: + - main +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v4 + - name: Install Dependencies + run: 'npm ci' + - name: Run Tests + run: 'npm run test:ci' diff --git a/package.json b/package.json index 51cb702..cdf2a79 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,9 @@ "build": "tsc --project tsconfig.build.json", "test": "vitest", "test:ui": "vitest --ui", + "test:ci": "vitest run", "format": "prettier . --write", + "format:check": "prettier . --check", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:preview": "vitepress preview docs",