bump dependencies #3375
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: pull_request | |
env: | |
GOPROXY: ${{ vars.GOPROXY }} | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- uses: Logerfo/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run golangci-lint | |
uses: golangci/[email protected] | |
with: | |
version: v1.54.0 | |
- name: Check clean | |
run: make check-clean | |
- name: Validate goreleaser config | |
run: | | |
go run github.com/goreleaser/goreleaser@latest check -f .github/goreleaser_configs/goreleaser.yml | |
build: | |
name: Build | |
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Build | |
run: go build -v -race ./cmd/arrai | |
test: | |
name: Test | |
strategy: | |
matrix: | |
platform: ${{ vars.BUILD_AND_TEST_OS_MATRIX && fromJSON(vars.BUILD_AND_TEST_OS_MATRIX) || fromJSON('[ "ubuntu-latest", "macOS-latest", "windows-latest" ]') }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Run tests | |
run: make test | |
coverage: | |
name: Coverage | |
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }} | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Calculate coverage | |
run: go test -v -covermode=atomic -coverprofile=coverage.out -race ./... | |
- name: Convert coverage to lcov | |
uses: jandelgado/[email protected] | |
with: | |
infile: coverage.out | |
outfile: coverage.lcov | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
if: ${{ github.repository_owner == 'anz-bank' }} | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: coverage.lcov |