From 96035e4a5723b1ac4276577418ec723e30c76348 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 22 Apr 2021 15:03:44 -0700 Subject: github: add workflows Add a workflows to perform some validation when pushing new commits. --- .github/workflows/go.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..e13f8da --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,35 @@ +name: go + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.16 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Go fmt + run: go fmt ./... + + - name: Go vet + run: go vet ./... + + - name: Test + run: go test -race -v ./... + + - name: Build + run: go build -v ./cmd/... -- cgit 1.4.1