Skip to content

Commit 4a90066

Browse files
authored
Add CI Unit Test (#377)
* oke-contributing guideline * Add unit test git action
1 parent 7f1ca47 commit 4a90066

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/makefile.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request: {}
5+
push: {}
6+
jobs:
7+
build:
8+
name: Build
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: Set up Go 1.x
13+
uses: actions/setup-go@v2
14+
with:
15+
go-version: 1.15
16+
id: go
17+
18+
- name: Check out code into the Go module directory
19+
uses: actions/checkout@v2
20+
21+
- name: Run Unit Tests
22+
run: |
23+
go test -covermode=count -coverprofile=profile.cov ./pkg/...
24+
- name: Send coverage
25+
env:
26+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
GO111MODULE=off go get github.com/mattn/goveralls
29+
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github

0 commit comments

Comments
 (0)