Skip to content

Commit

Permalink
feat: support go1.22 (#4217)
Browse files Browse the repository at this point in the history
* feat: support go1.22

Signed-off-by: Rui Chen <[email protected]>

* setup go toolchain for golangci-lint and tests jobs

Signed-off-by: Rui Chen <[email protected]>

---------

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored and GenPage committed Mar 5, 2024
1 parent d757296 commit 02e6e44
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
e2e:
docker:
- image: cimg/go:1.21 # If you update this, update it in the Makefile too
- image: cimg/go:1.22 # If you update this, update it in the Makefile too
environment:
# This version of TF will be downloaded before Atlantis is started.
# We do this instead of setting --default-tf-version because setting
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

# need to setup go toolchain explicitly
- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
tool_name: golangci-lint

skip-lint:
needs: [changes]
if: needs.changes.outputs.should-run-linting == 'false'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Go
uses: actions/setup-go@v5
- uses: actions/setup-go@v5
with:
go-version-file: go.mod

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
container: ghcr.io/runatlantis/testing-env:latest
steps:
- uses: actions/checkout@v4

# need to setup go toolchain explicitly
- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- run: make test-all
- run: make check-fmt
###########################################################
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG DEFAULT_CONFTEST_VERSION=0.46.0

# Stage 1: build artifact and download deps

FROM golang:1.21.6-alpine AS builder
FROM golang:1.22.0-alpine AS builder

ARG ATLANTIS_VERSION=dev
ENV ATLANTIS_VERSION=${ATLANTIS_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/runatlantis/atlantis/e2e

go 1.21
go 1.22

require (
github.com/google/go-github/v57 v57.0.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/runatlantis/atlantis

go 1.21
go 1.22

require (
github.com/Masterminds/sprig/v3 v3.2.3
Expand Down
2 changes: 1 addition & 1 deletion testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.6
FROM golang:1.22.0

RUN apt-get update && apt-get --no-install-recommends -y install unzip \
&& apt-get clean \
Expand Down

0 comments on commit 02e6e44

Please sign in to comment.