Skip to content

Configure CI to run only unit tests #4

Configure CI to run only unit tests

Configure CI to run only unit tests #4

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:unit
env:
CI: true
- name: Upload coverage reports (optional)
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false