Skip to content

Commit c2d9810

Browse files
committed
test: add github action
fix yaml format fix github action error fix failure fix build failure
1 parent 185f232 commit c2d9810

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ubuntu.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Linux tests
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Go 1.x
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: ^1.13
18+
id: go
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v2
22+
23+
- name: Run unit test
24+
run: |
25+
export PATH=$PATH:$HOME/.local/bin
26+
make verify
27+
28+
- name: Run build test
29+
run: |
30+
export PATH=$PATH:$HOME/.local/bin
31+
make
32+
33+
- name: Make container test
34+
run: |
35+
export PATH=$PATH:$HOME/.local/bin
36+
make container
37+
38+
- name: Get code coverage
39+
run: |
40+
GO111MODULE=off go get github.com/mattn/goveralls
41+
sudo -E env "PATH=$PATH" go test -covermode=count -coverprofile=profile.cov ./pkg/...
42+
$GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci

0 commit comments

Comments
 (0)