Update golang version to 1.22 #3
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: PR checks | |
permissions: | |
id-token: write # required to use OIDC authentication | |
contents: read # required to check out the code from the repo | |
on: | |
workflow_dispatch: | |
inputs: {} | |
pull_request: | |
jobs: | |
golangci-lint: | |
name: Execute golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.x" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 | |
only-new-issues: true | |
args: --issues-exit-code=0 --timeout 300s | |
check-go: | |
name: Execute go tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dir: ["cloudwatchmetrics", "csvexport"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.x" | |
- name: Install dependencies | |
run: | | |
go version | |
go install golang.org/x/lint/golint@latest | |
- name: Check Main | |
run: | | |
go vet ./... | |
golint ./... | |
working-directory: "./pkg/${{ matrix.dir }}" | |
- name: Test main | |
run: | | |
go test ./... | |
working-directory: "./pkg/${{ matrix.dir }}" |