name: Run Tests

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Set Node.JS
      uses: actions/setup-node@v3
      with:
        node-version: 16.x

    - name: Install dependencies
      run: npm ci
    
    - name: Run tests
      run: npm test
