Skip to content

chore: migrate unit tests to vitest #1798

chore: migrate unit tests to vitest

chore: migrate unit tests to vitest #1798

Workflow file for this run

name: Verify build
permissions:
contents: read
on:
workflow_dispatch:
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: install
run: pnpm install --frozen-lockfile
- name: build
run: pnpm build
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: install
run: pnpm install --frozen-lockfile
- name: lint
run: pnpm lint
test-chrome:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: install
run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: test
run: pnpm test --browsers=chromium
# ToDo: investigate coverage reporting
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test-firefox:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: install
run: pnpm install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: test
run: pnpm test --browsers=firefox
# ToDo: investigate errors & enable Safari testing again
# test-safari:
# runs-on: macos-14
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: refs/pull/${{ github.event.pull_request.number }}/merge
#
# - uses: pnpm/action-setup@v4
# name: Install pnpm
# with:
# run_install: false
#
# - name: install
# run: pnpm install --frozen-lockfile
#
# - name: test
# run: pnpm test --watch=false --browsers=SafariNative
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: install
run: pnpm install --frozen-lockfile
- name: prettier
run: npx prettier . --check