Skip to content

test: more cases

test: more cases #1031

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run build
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [18.x, lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Tests with coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' }}
run: pnpm test -- --coverage
- name: Tests
if: ${{ matrix.os != 'ubuntu-latest' || matrix.node != 'lts/*' }}
run: pnpm test
- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}