Skip to content

Commit 853454b

Browse files
authored
Add coverage steps to the GitHub action (#10)
1 parent ee01a95 commit 853454b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/go.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
11-
build:
10+
build-test-coverage:
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/checkout@v2
@@ -28,3 +27,14 @@ jobs:
2827

2928
- name: Test
3029
run: go1.18beta1 test -v ./...
30+
31+
- name: Calcualte coverage
32+
run: |
33+
go1.18beta1 test -v -covermode=count -coverprofile=coverage.out
34+
- name: Convert coverage.out to coverage.lcov
35+
uses: jandelgado/[email protected]
36+
- name: Coveralls
37+
uses: coverallsapp/[email protected]
38+
with:
39+
github-token: ${{ secrets.github_token }}
40+
path-to-lcov: coverage.lcov

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# go-tuple: Generic tuples for Go 1.18.
22

33
[![Go](https://github.com/barweiss/go-tuple/actions/workflows/go.yml/badge.svg)](https://github.com/barweiss/go-tuple/actions/workflows/go.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/barweiss/go-tuple/badge.svg)](https://coveralls.io/github/barweiss/go-tuple)
45

56
Go 1.18 tuple implementation.
67

0 commit comments

Comments
 (0)