Skip to content

ci: add GitHub Actions workflow for automated testing #3

ci: add GitHub Actions workflow for automated testing

ci: add GitHub Actions workflow for automated testing #3

Workflow file for this run

name: Test
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use 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
uses: actions/upload-artifact@v3
with:
name: coverage-${{ matrix.node-version }}
path: coverage/