Skip to content

Go

Go #1216

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.x']
steps:
- name: Install protobuf
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Install protoc-gen-go
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
- name: Install proto_generator
run: |
go install github.com/openconfig/ygot/proto_generator@latest
- name: Install Staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Check out code
uses: actions/checkout@v2
with:
path: go/src/github.com/openconfig/gribi
- name: Get dependencies
run: |
go get -v -t -d ./...
working-directory: go/src/github.com/openconfig/gribi
- name: Generate dependencies
run: make generate
working-directory: go/src/github.com/openconfig/gribi
- name: Build packages
run: go build -v ./...
working-directory: go/src/github.com/openconfig/gribi
- name: Run Tests
run: go test -v ./...
working-directory: go/src/github.com/openconfig/gribi
- name: Run race tests
run: go test -race -v ./...
working-directory: go/src/github.com/openconfig/gribi