thecodrr/fdir

View on GitHub
.github/workflows/run-tests.yml

Summary

Maintainability
Test Coverage
name: Run tests

on:
  pull_request:
  push:
    branches: [master]

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

    strategy:
      matrix:
        node-version: [16.x, 18.x, 20.x]
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
          check-latest: true
      - run: npm i
      - run: npm run test:coverage
        env:
          CI: true
      - name: Send Report to Coveralls
        uses: coverallsapp/github-action@v1.1.1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel: true

  finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Send Parallel Finished
        uses: coverallsapp/github-action@v1.1.1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          parallel-finished: true