This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
Merge pull request #103 from bancodobrasil/feat/minio-resource-loader #485
Workflow file for this run
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: | |
pull_request: | |
branches: [ develop, master ] | |
env: | |
LATEST_GO_VERSION: "1.22" | |
GO111MODULE: "on" | |
jobs: | |
test: | |
name: Test on go ${{ matrix.go_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
go_version: ['1.21','1.22'] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go_version }} | |
- name: "Fetch dependencies" | |
run: go mod download | |
# Only run gofmt, vet & lint against the latest Go version | |
- name: "Run golint" | |
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}} | |
run: | | |
go install golang.org/x/lint/golint@latest | |
golint -set_exit_status $1 ./... | |
exit $1 | |
- name: "Run gofmt" | |
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}} | |
run: diff -u <(echo -n) <(gofmt -d -e .) | |
- name: "Run go vet" | |
if: ${{ matrix.go_version == env.LATEST_GO_VERSION && matrix.os == 'ubuntu-latest'}} | |
run: go vet -v ./... | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... |