Skip to content

Merge pull request #4 from CodeSignal/bugfix #11

Merge pull request #4 from CodeSignal/bugfix

Merge pull request #4 from CodeSignal/bugfix #11

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: tests/package-lock.json
- name: Install dependencies
working-directory: ./tests
run: npm ci
- name: Run unit tests
working-directory: ./tests
run: npm test
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
file: ./tests/coverage/lcov.info
flags: unittests
name: codecov-umbrella
test-matrix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['18', '20', '21']
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'
cache-dependency-path: tests/package-lock.json
- name: Install dependencies
working-directory: ./tests
run: npm ci
- name: Run unit tests
working-directory: ./tests
run: npm test