From 9e6c7d23a345197deb6654067bf6110ecaf37857 Mon Sep 17 00:00:00 2001 From: Ben Kraft Date: Wed, 14 Feb 2024 22:31:04 -0500 Subject: [PATCH] Pin lint workflow's Go version (#311) We weren't pinning the Go version for golangci-lint (only the golangci-lint version); seemingly it breaks on 1.21+. Now we're using a new version making it easy to pin back to 1.20. Later I'll look at why 1.21+ are failing (#313). While I was at it I added tests on 1.21 (1.22+ is failing, again will look later, #312), and upgraded the setup-go action itself. I have: - [x] Written a clear PR title and description (above) - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla) - [x] Added tests covering my changes, if applicable (n/a) - [x] Included a link to the issue fixed, if applicable (n/a) - [x] Included documentation, for new features (n/a) - [x] Added an entry to the changelog (n/a) --- .github/workflows/go.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8faa3cc9..5fccda16 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.18', '1.19', '1.20' ] + go: [ '1.18', '1.19', '1.20', '1.21' ] steps: - name: Set up Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} id: go @@ -36,10 +36,16 @@ jobs: runs-on: ubuntu-latest steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + id: go + - name: Git checkout uses: actions/checkout@v2 - name: Run lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: version: v1.52.2 # should match internal/lint/go.mod