Skip to content

Commit 452fb82

Browse files
authored
Merge pull request #46 from Code-Hex/add/cov
added codecov
2 parents 8b9f496 + ef4a5bd commit 452fb82

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
make lint
2929
env:
3030
GO111MODULE: off
31+
- name: Test Coverage (pkg)
32+
run: go test ./... -coverprofile=coverage.txt
33+
- name: Upload coverage
34+
uses: codecov/codecov-action@v2
35+
with:
36+
files: coverage.txt
3137
- name: Run GoReleaser
3238
if: contains(github.ref, 'tags/v')
3339
uses: goreleaser/goreleaser-action@v2

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ vet:
2020
cd cmd && go vet ./...
2121

2222
.PHONY: test
23-
test:
23+
test: test/pkg test/cli
24+
25+
.PHONY: test/pkg
26+
test/pkg:
2427
go test ./...
28+
29+
.PHONY: test/cli
30+
test/cli:
2531
cd cmd && go test ./...
2632

2733
.PHONY: man

0 commit comments

Comments
 (0)