Update dependency go to v1.24.1 #943
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: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
generate-mocks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.17 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.7 | |
- uses: actions/checkout@v3 | |
# update the pull request branch | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.GHA_TOKEN }} | |
- run: go mod download | |
- name: Generate Mock Code | |
run: | | |
go install github.com/golang/mock/mockgen@v1.6.0 | |
go generate ./... | |
- uses: int128/update-generated-files-action@v2 | |
test: | |
needs: generate-mocks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.7 | |
- uses: actions/checkout@v3 | |
- run: go mod download | |
- run: go test -race ./... | |
- run: go build -v ./cmd/aws_ri_exporter | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: golangci/golangci-lint-action@v3 |