45 lines
750 B
YAML
45 lines
750 B
YAML
name: Go build
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
go-build:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.15
|
|
cache: true
|
|
|
|
- name: Download dependencies
|
|
run: go mod download
|
|
|
|
- name: Check gofmt
|
|
run: .github/workflow-scripts/check-gofmt.sh .
|
|
|
|
- name: Build
|
|
run: go build -v
|
|
|
|
- name: Test
|
|
run: go test -v
|
|
|
|
- name: Vet
|
|
run: go vet
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: go-build
|
|
path: ./go-nsupdate
|