name: CI

on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        node-version: [10.0.x, 10.x, 12.0.x, 12.x, 14.0.x, 14.x, 15.x]
        os: [ubuntu-latest, macOS-latest, windows-latest]
      fail-fast: false

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v1.1.0

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

      - name: Install dependencies
        run: npm install

      # Run for all environments
      # Just output raw tap, the classic tap output gets confused sometimes
      # on GH Actions, especially in windows.
      - name: Run Tap Tests
        run: node test.js
