Skip to content

Migrate to Vitest

Migrate to Vitest #73

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DEFAULT_NODE_VERSION: 24.x
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- run: corepack enable
- run: yarn install --immutable
- run: yarn run lint
node:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 22.x
- 24.x
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: corepack enable
- run: yarn install --immutable
- run: yarn run build
- run: yarn vitest run --project node --coverage
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: node-${{ matrix.node-version }}
parallel: true
browser:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
browser:
- chromium
- firefox
- webkit
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- run: corepack enable
- run: yarn install --immutable
- run: yarn run build
- run: yarn playwright install --with-deps ${{ matrix.browser }}
- run: yarn vitest run --project ${{ matrix.browser }} --coverage
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: browser-${{ matrix.browser }}
parallel: true
coveralls:
needs:
- node
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true