File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
10+
11+ env :
12+ GO111MODULE : on
13+ GOPROXY : https://proxy.golang.org
14+
15+ jobs :
16+ test :
17+ strategy :
18+ matrix :
19+ os : [ubuntu-latest, macos-latest, windows-latest]
20+ go : [1.11, 1.12, 1.13]
21+ name : ${{ matrix.os }} @ Go ${{ matrix.go }}
22+ runs-on : ${{ matrix.os }}
23+ steps :
24+ - name : Set up Go ${{ matrix.go }}
25+ uses : actions/setup-go@v1
26+ with :
27+ go-version : ${{ matrix.go }}
28+
29+ - name : Set GOPATH and PATH
30+ run : |
31+ echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
32+ echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
33+ shell : bash
34+
35+ - name : Checkout Code
36+ uses : actions/checkout@v1
37+ with :
38+ ref : ${{ github.ref }}
39+
40+ - name : Install Dependencies
41+ run : go get -v golang.org/x/lint/golint
42+
43+ - name : Run Tests
44+ run : |
45+ golint -set_exit_status ./...
46+ go test -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
47+
48+ - name : Upload coverage to Codecov
49+ if : success() && matrix.go == 1.13 && matrix.os == 'ubuntu-latest'
50+ uses : codecov/codecov-action@v1
51+ with :
52+ token :
53+ fail_ci_if_error : false
You can’t perform that action at this time.
0 commit comments