Skip to content

Action to check coverage on changes made in on a branch. Automatically comments on a PR when changed files does not have coverage in the supplied coverage report

Notifications You must be signed in to change notification settings

rvanmarkus/changes-coverage-check-action

Repository files navigation

Changes (in) Coverage Check Action

This action will use your testing coverage report JSON to check coverage on changes made in on a branch and automatically find lines which are not present in the coverage report (this means probablly that it's not covered with a test). A markdown file with the results will be generated so this can be used (with for ex. sticky-pull-request-comment to post an PR comment). Tested with Vitest (c8) coverage report (full report, so not the summary)

Inputs

Input Description Default
working-directory Base path for input files and artifacts /home/runner

Example job

test:
    ....
    -   name: ➕ Create diff
        run: |
            git diff -U0 origin/${{ github.event.pull_request.base.ref }}...HEAD --output /home/runner/diff

    -   name: 🖌️ Check Coverage
        uses: rvanmarkus/changes-coverage-check-action
        with:
            working-directory: /home/runner

    -   name: 📈 Publish coverage report
        uses: marocchino/sticky-pull-request-comment@44ff4b00ca3727f18157a7271244078ff85ff610
        with:
            recreate: true
            path: /home/runner/coverage-comment.md

About

Action to check coverage on changes made in on a branch. Automatically comments on a PR when changed files does not have coverage in the supplied coverage report

Resources

Stars

Watchers

Forks

Packages

No packages published