name: Node.js CI
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  ci:
    name: Lint / Build / Test
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x]

    steps:
      - name: Checkout Source Files
        uses: actions/checkout@v2

      - name: Use Node.js v${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install Dependencies
        run: npm ci

      - name: Lint Source Files
        run: npm run lint

      - name: Verify Build
        run: npm run build

      - name: Run Tests
        run: npm run test
