name: Build

on: [push, pull_request]

jobs:
  build:
    name: Node ${{ matrix.node_version }} on ${{ matrix.os }}

    strategy:
      matrix:
        include:
          # EOL: April 2021
          - os: ubuntu-latest
            node_version: 10.x

          # EOL: April 2022
          - os: ubuntu-latest
            node_version: 12.x

          # EOL: April 2023
          - os: ubuntu-latest
            node_version: 14.x
          - os: macOS-latest
            node_version: 14.x
          - os: windows-latest
            node_version: 14.x

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

    steps:
      - uses: actions/checkout@master

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

      - name: Install
        run: yarn --frozen-lockfile --non-interactive

      - name: Build
        run: yarn build
        env:
          NODE_ENV: production

      - name: Test
        run: yarn test

name: Build

on: [push, pull_request]

jobs:
  build:
    name: Node ${{ matrix.node_version }} on ${{ matrix.os }}

    strategy:
      matrix:
        include:
          # EOL: April 2021
          - os: ubuntu-latest
            node_version: 10.x

          # EOL: April 2022
          - os: ubuntu-latest
            node_version: 12.x

          # EOL: April 2023
          - os: ubuntu-latest
            node_version: 14.x
          - os: macOS-latest
            node_version: 14.x
          - os: windows-latest
            node_version: 14.x

          # EOL: June 2021
          - os: ubuntu-latest
            node_version: 15.x

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

    steps:
      - uses: actions/checkout@master

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

      - name: Install
        run: yarn --frozen-lockfile --non-interactive

      - name: Build
        run: yarn build
        env:
          NODE_ENV: production

      - name: Test
        run: yarn test

Add node 15 to test matrix
Add node 15 to test matrix
