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 and test
        run: |
          node --version
          yarn
          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: 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

Split install & test in github actions
Split install & test in github actions
