Skip to content

Commit

Permalink
fix(deps): bump go versions to go 1.21 & toolchain 1.21.8 (#198)
Browse files Browse the repository at this point in the history
Some of our dependencies now require go1.21. Updating all the things to
1.21.

---------

Signed-off-by: Nicole Hubbard <[email protected]>
  • Loading branch information
nicolerenee authored Apr 2, 2024
1 parent ecf4e94 commit aab67d4
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/go/.devcontainer/base.Dockerfile

# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster
ARG VARIANT="1.20-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
ARG VARIANT="1.21-bullseye"
FROM mcr.microsoft.com/devcontainers/go:1-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
Expand Down
13 changes: 6 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
// Update the VARIANT arg to pick a version of Go: 1, 1.19, 1.18
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "1.20"
"VARIANT": "1.21"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
Expand All @@ -23,20 +26,16 @@
"go.useLanguageServer": true,
"go.gopath": "/go"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
4 changes: 2 additions & 2 deletions .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v4
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version-file: 'go.mod'
- name: Run go tests and generate coverage report
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage report
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module go.infratographer.com/x

go 1.20
go 1.21

toolchain go1.21.8

require (
entgo.io/contrib v0.4.5
Expand Down
Loading

0 comments on commit aab67d4

Please sign in to comment.