format before installing deps #302
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: [push] | |
jobs: | |
build-1_20: | |
name: Build with Go 1.20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.20 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.20 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Format | |
run: | | |
set -x | |
go fmt ./... | |
git diff | |
- name: Get dependencies | |
run: | | |
go get -v -t ./... | |
- name: Lint | |
run: go vet ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Build Broker | |
run: go build -C cmd/broker -v | |
build-1_21: | |
name: Build with Go 1.21 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.21 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Format | |
run: | | |
set -x | |
go fmt ./... | |
git diff | |
- name: Get dependencies | |
run: | | |
go get -v -t ./... | |
- name: Lint | |
run: go vet ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Build Broker | |
run: go build -C cmd/broker -v | |
build-1_22: | |
name: Build with Go 1.22 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.22 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.22 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Format | |
run: | | |
set -x | |
go fmt ./... | |
git diff | |
- name: Get dependencies | |
run: | | |
go get -v -t ./... | |
- name: Lint | |
run: go vet ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Build Broker | |
run: go build -C cmd/broker -v |