From d4a0127bfb553c42352c0453b7e00c2cdfd69b4d Mon Sep 17 00:00:00 2001 From: Micah Engle-Eshleman Date: Sat, 12 Oct 2024 23:18:36 -0700 Subject: [PATCH] Run unit tests in Github Actions --- .github/workflows/playwright.yml | 4 ++-- .github/workflows/vitest.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/vitest.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 4aec01b..79093b9 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,4 +1,4 @@ -name: Playwright Tests +name: Playwright End-to-End Tests on: push: branches: [main] @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: Install dependencies run: npm ci - name: Install Playwright Browsers diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml new file mode 100644 index 0000000..659d972 --- /dev/null +++ b/.github/workflows/vitest.yml @@ -0,0 +1,19 @@ +name: Vitest Unit Tests +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + test: + timeout-minutes: 2 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Install dependencies + run: npm ci + - name: Run unit tests + run: npm run test:unit