name: Node.js CI

on: [push, pull_request]

jobs:
  build:

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

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        node-version: [8.x, 10.x, 12.x]
        generator-version: [2.0.5, 3.0.0, 4.0.0, latest]

    steps:
    - uses: actions/checkout@v2
    - name: OS ${{ matrix.os }} ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm install yeoman-generator@${{ matrix.generator-version }}
    - run: npm test
      env:
        CI: true

name: Node.js CI

on: [push, pull_request]

jobs:
  build:

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

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        node-version: [8.x, 10.x, 12.x]
        generator-version: [2.0.5, latest]

    steps:
    - uses: actions/checkout@v2
    - name: OS ${{ matrix.os }} ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm install yeoman-generator@${{ matrix.generator-version }}
    - run: npm test
      env:
        CI: true

Remove CI test for generator 3 and 4
Remove CI test for generator 3 and 4

Testing against 2.0.5 and latest is enough