public-js/eslint-plugin-node

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: Unit tests

on:
  pull_request:
    branches:
      - main
      - '!release/**'
  push:
    branches:
      - main
      - '!release/**'

jobs:
  test-nx:
    name: Any test with nx
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Setup Node.js and cache
        uses: ./.github/actions/nodejs

      - name: Test all packages
        run: npm run ci:all:test

      - name: Report to Codacy
        uses: codacy/codacy-coverage-reporter-action@v1
        with:
          project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
          coverage-reports: 'coverage/packages/*/lcov.info'

      - name: Report to Code Climate
        uses: paambaati/codeclimate-action@v3.2.0
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        with:
          coverageLocations: 'coverage/packages/*/lcov.info:lcov'

      - name: Report to Codecov
        uses: codecov/codecov-action@v3
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: 'coverage/packages/*/lcov.info'

concurrency:
  group: test-${{ github.head_ref }}
  cancel-in-progress: true