Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Comment and upload code coverage

License

Notifications You must be signed in to change notification settings

reside-eng/code-coverage-action

Folders and files

NameName
Last commit message
Last commit date
Feb 25, 2022
Sep 21, 2021
Nov 24, 2021
Nov 24, 2021
Sep 21, 2021
Sep 21, 2021
Feb 25, 2022
Sep 21, 2021
Feb 10, 2022
Feb 10, 2022
Sep 21, 2021
Nov 25, 2021
Feb 10, 2022
Sep 21, 2021
Feb 10, 2022
Feb 10, 2022

Repository files navigation

code-coverage-action

Comments and uploads code coverage for global reporting

NPM version Build Status License semantic-release Code Style

Use

  1. Call action in your workflow after running tests with coverage report generation:
name: Verify

on: [pull_request]

env:
  NODE_VERSION: 16.x

jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    if: github.actor != 'dependabot[bot]'
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2.3.4

      - name: Use Node.js ${{ env.NODE_VERSION }}
        uses: actions/setup-node@v2.4.0
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: "yarn"

      - name: Install dependencies
        run: yarn install --frozen-lockfile

      - name: Verify lint
        run: yarn lint

      - name: Test
        run: yarn test --coverage --coverageReporters="json-summary"

      - name: Report Coverage
        uses: reside-eng/code-coverage-action@v1.0.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}