30 lines
495 B
YAML
30 lines
495 B
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.19
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -v ./... -covermode=count -coverprofile=cover.out
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- uses: codecov/codecov-action@v1
|
|
with:
|
|
flags: unittests
|