Skip to content

Project configuration with e2e tests and coverage. #1

Project configuration with e2e tests and coverage.

Project configuration with e2e tests and coverage. #1

Workflow file for this run

name: Validation
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
check-format:
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 ci
- name: Check formatting using prettier
run: npm run check-format
check-types:
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 ci
- name: Check types using tsc
run: npm run check-types
check-lint:
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 ci
- name: Check using eslint
run: npm run check-lint
build-dev:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [check-format, check-types, check-lint]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Check using eslint
run: npm run build-dev
test-unit:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build-dev]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npx jest
test-ui:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build-dev]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test-coverage:
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [test-ui, test-unit]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run all tests with coverage
run: npm run coverage
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: coverage-total
path: coverage-total/
retention-days: 30