name: matrix-include-exclude
on: push

jobs:
  build:
    name: PHP ${{ matrix.os }} ${{ matrix.node}}
    runs-on: ${{ matrix.os }}
    steps:
      - run: echo ${NODE_VERSION} | grep ${{ matrix.node }}
        env:
          NODE_VERSION: ${{ matrix.node }}
    strategy:
      matrix:
        os: [ubuntu-18.04, macos-latest]
        node: [4, 6, 8, 10]
        exclude:
          - os: macos-latest
            node: 4
        include:
          - os: ubuntu-16.04
            node: 10

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node: [8.x, 10.x, 12.x, 13.x]
    steps:
      - run: echo ${NODE_VERSION} | grep ${{ matrix.node }}
        env:
          NODE_VERSION: ${{ matrix.node }}