-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19e6116
commit 48da771
Showing
4 changed files
with
85 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- go: 1.12 | ||
build-with: true | ||
- go: 1.13 | ||
build-with: false | ||
- go: 1.14 | ||
build-with: false | ||
- go: 1.15 | ||
build-with: false | ||
continue-on-error: ${{ matrix.build-with == false }} | ||
name: Build with ${{ matrix.go }} | ||
defaults: | ||
run: | ||
working-directory: src/github.com/${{ github.repository }} | ||
env: | ||
GOPATH: ${{ github.workspace }} | ||
GO111MODULE: off | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: src/github.com/${{ github.repository }} | ||
|
||
- name: Install dep | ||
run: curl -s -L -o dep https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/ | ||
|
||
- run: dep ensure -v -vendor-only | ||
|
||
- name: Vet | ||
run: go vet ./... | ||
|
||
- name: Test | ||
run: go test -vet=off -race -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
- name: Upload code coverage report | ||
if: matrix.build-with == true | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: bash <(curl -s https://raw.githubusercontent.com/VividCortex/codecov-bash/master/codecov) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
threshold: 15% | ||
patch: off |