Skip to content

feat: refactor and add test cases #1

feat: refactor and add test cases

feat: refactor and add test cases #1

Workflow file for this run

name: Tests
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [14.x, 16.x, 18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Upload coverage (Ubuntu + Node 18 only)
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '18.x'
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results/