Skip to content

Commit e4cf429

Browse files
authored
coveralls (#2)
Add coveralls
1 parent aa071c4 commit e4cf429

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/workflows/go.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010

11-
build:
11+
test:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
@@ -22,4 +22,13 @@ jobs:
2222
run: go build -v ./...
2323

2424
- name: Test
25-
run: go test -v ./...
25+
run: go test -v -covermode=count -coverprofile=coverage.out ./...
26+
27+
- name: Coveralls install goveralls
28+
run: go get github.com/mattn/goveralls
29+
30+
- name: Coveralls push
31+
run: goveralls -coverprofile=coverage.out -service=github
32+
env:
33+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Coverage Status](https://coveralls.io/repos/github/rekby/fixenv/badge.svg?branch=master)](https://coveralls.io/github/rekby/fixenv?branch=master)
2+
13
Go Fixtures
24
===========
35

@@ -134,4 +136,4 @@ func TestSecondTransferBetweenCustomers(t *testing.T){
134136

135137
// background:
136138
// after all test finished drop database
137-
```
139+
```

0 commit comments

Comments
 (0)