Skip to content

Commit 9808859

Browse files
authored
Merge pull request #4 from yudppp/add-coveralls
Add coveralls setting
2 parents 7ee84e2 + 77b5c19 commit 9808859

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/test.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,14 @@ jobs:
2121
- name: Build
2222
run: go build -v ./...
2323

24-
- name: Test
25-
run: go test -v ./...
24+
- name: Run Unit tests
25+
run: |
26+
go test -race -covermode atomic -coverprofile=covprofile ./...
27+
28+
- name: Install goveralls
29+
run: go install github.com/mattn/goveralls@latest
30+
31+
- name: Send coverage
32+
env:
33+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: goveralls -coverprofile=covprofile -service=github

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
![test workflow](https://github.com/yudppp/throttle/actions/workflows/test.yml/badge.svg)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/yudppp/throttle)](https://goreportcard.com/report/github.com/yudppp/throttle)
5+
[![Coverage Status](https://coveralls.io/repos/github/yudppp/throttle/badge.svg?branch=master)](https://coveralls.io/github/yudppp/throttle?branch=master)
56

67
Throttle is an object that will perform exactly one action per duration.
78
Do call the function f if a specified duration has passed since the last function f was called for this instance of Throttle.

0 commit comments

Comments
 (0)