From a91b407b9a35a864ecdaafb93b2f4010332ab881 Mon Sep 17 00:00:00 2001 From: Blaine Booher Date: Tue, 26 Nov 2024 17:03:37 -0600 Subject: [PATCH] adding github actions to kick off tests --- .github/workflows/test.yml | 26 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6d31b82 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test diff --git a/package.json b/package.json index c186fb6..46aac3a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "vite build", "lint": "eslint .", "preview": "vite preview", - "test": "vitest", + "test": "vitest run", "coverage": "vitest run --coverage" }, "dependencies": {