name: Node
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        node-version:
          - 18
          - 16
          - 14
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
      - name: yarn install
        run: |
          node --version
          yarn
        env:
          CI: true
          FORCE_COLOR: 1
      - name: yarn test
        run: yarn test
        env:
          CI: true
          FORCE_COLOR: 1
      - name: Upload code coverage
        uses: codecov/codecov-action@v2
        with:
          file: ./coverage/clover.xml

name: Node
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        node-version:
          - 18
          - 16
          - 14
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - name: yarn install
        run: |
          node --version
          yarn
        env:
          CI: true
          FORCE_COLOR: 1

      - name: Eslint
        run: yarn eslint . --ext .js --ext .ts
      - name: Test inquirer package (current version)
        run: yarn lerna exec npm test --scope inquirer
      - name: Test monorepo packages (new version)
        run: |
          yarn lerna run tsc
          yarn jest

      - name: Upload code coverage
        uses: codecov/codecov-action@v2
        with:
          file: ./coverage/clover.xml

Make GH action more granular to help pin-pointing problems
Make GH action more granular to help pin-pointing problems
