Skip to content

Commit

Permalink
feat: added test coverage report
Browse files Browse the repository at this point in the history
* feat: testing test coverage

* ci: run coverage report only on master branch

* docs: added go test coverage badge
  • Loading branch information
AlexNabokikh committed Feb 22, 2023
1 parent 016b58a commit 7762562
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ jobs:
- name: Go Vet
run: go vet ./tsort

- name: Go Test
run: go test -v ./...
- name: Test with Coverage
run: go test -v -coverprofile=coverage.out ./...

- name: Update coverage report
- name: Coverage Report
uses: ncruces/go-coverage-report@main
if: |
matrix.os == 'ubuntu-latest' &&
github.event_name == 'push'
continue-on-error: true
# with:
# branch: master
if: github.ref == 'refs/heads/master'
with:
coverage_path: coverage.out
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![badge-gh-release](https://github.com/AlexNabokikh/tfsort/actions/workflows/release.yml/badge.svg)](https://github.com/AlexNabokikh/tfsort/actions/workflows/release.yml/badge.svg)
[![badge-gh-tests](https://github.com/AlexNabokikh/tfsort/actions/workflows/test.yml/badge.svg)](https://github.com/AlexNabokikh/tfsort/actions/workflows/test.yml/badge.svg)
[![go-report-card](https://goreportcard.com/badge/github.com/AlexNabokikh/tfsort)](https://goreportcard.com/report/github.com/AlexNabokikh/tfsort)
[![go-test-coverage](https://github.com/AlexNabokikh/tfsort/wiki/coverage.svg)](https://raw.githack.com/wiki/AlexNabokikh/tfsort/coverage.html)

![Logo](files/logo.png)

Expand Down

0 comments on commit 7762562

Please sign in to comment.