2021-01-16 06:34:06 +00:00
|
|
|
name: build
|
2021-01-15 15:29:46 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.15
|
|
|
|
|
2021-02-06 11:05:47 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: go get -u golang.org/x/lint/golint
|
|
|
|
|
2021-01-15 15:29:46 +00:00
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
- name: Test
|
2021-01-19 12:11:25 +00:00
|
|
|
run: go test -v ./... -covermode=count -coverprofile=cover.out
|
2021-01-19 10:20:26 +00:00
|
|
|
|
2021-02-06 11:05:47 +00:00
|
|
|
- name: Vet & Lint
|
|
|
|
run: |
|
|
|
|
go vet ./...
|
|
|
|
golint ./...
|
|
|
|
|
2021-01-19 12:11:25 +00:00
|
|
|
- uses: codecov/codecov-action@v1
|
2021-01-19 10:20:26 +00:00
|
|
|
with:
|
2021-01-19 12:11:25 +00:00
|
|
|
flags: unittests
|