From b14127b189da95a300d31865e3bfb769a7bfab8d Mon Sep 17 00:00:00 2001 From: Raffaele Lungarella Date: Mon, 20 Jan 2025 18:57:37 +0100 Subject: [PATCH] chore: added unit testing in CI workflow --- .github/workflows/{playwright.yml => ci.yml} | 45 +++++++------------- 1 file changed, 15 insertions(+), 30 deletions(-) rename .github/workflows/{playwright.yml => ci.yml} (50%) diff --git a/.github/workflows/playwright.yml b/.github/workflows/ci.yml similarity index 50% rename from .github/workflows/playwright.yml rename to .github/workflows/ci.yml index 2156b91..6ac8efe 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/ci.yml @@ -1,39 +1,11 @@ -# name: Playwright Tests -# on: -# push: -# branches: [main] -# pull_request: -# branches: [main] -# jobs: -# test_e2e: -# timeout-minutes: 60 -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - uses: actions/setup-node@v4 -# with: -# node-version: lts/* -# - name: Install dependencies -# run: npm install -g pnpm && pnpm install -# - name: Install Playwright Browsers -# run: pnpm exec playwright install --with-deps -# - name: Run Playwright tests -# run: pnpm exec playwright test -# - uses: actions/upload-artifact@v4 -# if: ${{ !cancelled() }} -# with: -# name: playwright-report -# path: playwright-report/ -# retention-days: 30 - -name: Playwright Tests +name: CI on: push: branches: [main] pull_request: branches: [main] jobs: - test_all: + e2e_tests: timeout-minutes: 60 runs-on: ubuntu-latest steps: @@ -55,3 +27,16 @@ jobs: name: playwright-report path: playwright-report/ retention-days: 30 + + unit_tests: + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm install -g pnpm && pnpm install + - name: Run Vitest tests + run: pnpm vitest run