2020-05-31 06:44:34 +00:00
|
|
|
name: Go
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ '*' ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2020-06-04 16:16:45 +00:00
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
2020-06-15 16:15:54 +00:00
|
|
|
- name: Go mod tidy checker
|
|
|
|
id: gomodtidy
|
|
|
|
uses: ./.github/actions/gomodtidy
|
|
|
|
|
2020-06-04 16:16:45 +00:00
|
|
|
- name: Gofmt checker
|
|
|
|
id: gofmt
|
|
|
|
uses: ./.github/actions/gofmt
|
|
|
|
with:
|
|
|
|
path: ./
|
|
|
|
|
2020-05-31 06:44:34 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Go 1.x
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: ^1.14
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: go build -v ./...
|
|
|
|
|
|
|
|
# Tests run via Bazel for now...
|
|
|
|
# - name: Test
|
|
|
|
# run: go test -v ./...
|