Skip to content

Commit 4f26027

Browse files
authored
Add coverage and badges (#2)
* add badges * add coverage
1 parent 07081a0 commit 4f26027

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/test_and_build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
on: [push, pull_request]
2-
name: run tests
2+
name: test and build
33
jobs:
44
lint:
55
runs-on: ubuntu-latest
@@ -30,6 +30,16 @@ jobs:
3030
uses: actions/checkout@v1
3131
- name: Run tests
3232
run: make test
33+
- name: Convert coverage to lcov
34+
uses: jandelgado/[email protected]
35+
with:
36+
infile: coverage.out
37+
outfile: coverage.lcov
38+
- name: Coveralls
39+
uses: coverallsapp/[email protected]
40+
with:
41+
github-token: ${{ secrets.github_token }}
42+
path-to-lcov: coverage.lcov
3343

3444
build:
3545
runs-on: ubuntu-latest

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# gcov2lcov
22

3+
[![Build Status](https://github.com/jandelgado/gcov2lcov/workflows/run%20tests/badge.svg)](https://github.com/jandelgado/gcov2lcov/actions?workflow=run%20tests)
4+
[![Coverage Status](https://coveralls.io/repos/github/jandelgado/gcov2lcov/badge.svg?branch=master)](https://coveralls.io/github/jandelgado/gcov2lcov?branch=master)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/jandelgado/gcov2lcov)](https://goreportcard.com/report/github.com/jandelgado/gcov2lcov)
6+
37
Convert golang test coverage to lcov format (which can for example be uploaded
48
to coveralls).
59

0 commit comments

Comments
 (0)