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:
|
2022-05-16 15:37:03 +00:00
|
|
|
go-version: 1.17
|
2021-01-15 15:29:46 +00:00
|
|
|
|
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 ./...
|
2021-03-03 14:01:32 +00:00
|
|
|
golint -set_exit_status ./...
|
2021-02-06 11:05:47 +00:00
|
|
|
|
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
|