Skip to content

fix: add coverage dependency + CI fix #87

fix: add coverage dependency + CI fix

fix: add coverage dependency + CI fix #87

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
- name: Run tests with coverage
if: matrix.node-version == '20' && matrix.os == 'ubuntu-latest'
continue-on-error: true
run: npx vitest run --coverage --reporter=json --outputFile=coverage.json
- name: Upload coverage
if: matrix.node-version == '20' && matrix.os == 'ubuntu-latest'
continue-on-error: true
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
publish-dry:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run build
- run: npm pack --dry-run