Skip to content

ci: updates goreleaser params and retrieves go from mod file #274

ci: updates goreleaser params and retrieves go from mod file

ci: updates goreleaser params and retrieves go from mod file #274

name: Build & Test
on:
pull_request:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/build-and-test.yaml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go vet
run: |
go vet ./...
go vet github.com/theurichde/go-aws-sso/internal
- name: Tests
run: |
go clean -r -testcache
go clean -r -x -modcache
go clean -r -x -testcache
go clean -r -x -cache
go test -v ./...
go test -v github.com/theurichde/go-aws-sso/internal