name: Node CI

on:
  - push
  - workflow_dispatch

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node_version: [12.x, 14.x]
        os: [ubuntu-latest, windows-latest]
    steps:
      - run: git config --global core.autocrlf false
        if: matrix.os == 'windows-latest'

      - uses: actions/checkout@v2

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

      - run: echo ${{github.ref}}

      - run: npm ci

      - run: npm run lint

      - run: npm run test
        env:
          PROGRESS: none
          NODE_ENV: test
