kkamkou/node-gelf-pro

View on GitHub
.github/workflows/node.js.yml

Summary

Maintainability
Test Coverage
name: Node.js CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    name: node ${{ matrix.node }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        node: ['lts/*', '8', '10', '12', '14', '16', '18', '20']
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'

      - run: npm install

      - run: npm test

      - name: coveralls parallel
        uses: coverallsapp/github-action@v2
        with:
          github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
          flag-name: ${{matrix.os}}-node-${{ matrix.node }}
          parallel: true

  finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: coveralls publish
        uses: coverallsapp/github-action@v2
        with:
          github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
          parallel-finished: true