Skip to content

Action to show test and coverage summary as job summary and pull request comment.

License

Notifications You must be signed in to change notification settings

malaupa/go-test-coverage-summary-action

Repository files navigation

go-test-coverage-summary-action

Action to show test and coverage summary as job summary and pull request comment.

Inputs

test_results

Defines verbose test output file. Defaults to test.out.

coverage_profile

Defines coverage profile output file. Defaults to cover.out.

with_archive

Enables coverage html report as job artifact attachment. Defaults to false.

github_token

Used to comment pull requests. Defaults to ${{ github.token }}.

Example usage

- name: Run test
  run: go test -v -coverprofile cover.out ./... | tee test.out
  shell: bash
- name: Process results
  if: always()
  uses: malaupa/[email protected]
  with:
    test_results: "test.out"
    coverage_profile: "cover.out"
    with_archive: true

Example Pull Request Comment

Screenshot

About

Action to show test and coverage summary as job summary and pull request comment.

Resources

License

Stars

Watchers

Forks

Packages

No packages published