Skip to content

Commit

Permalink
update go.mod to declare go1.18 and updated CI to use Go 1.18 for tes…
Browse files Browse the repository at this point in the history
…ts (#741)

* update go.mod to declare go1.18 and updated CI to use Go 1.18 for tests
* use cimg/go:1.18 as go executor
* update golangci-lint for compat with go1.18
  • Loading branch information
davidmdm authored Jun 29, 2022
1 parent cc194b5 commit 897ebaf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ orbs:
executors:
go:
docker:
- image: circleci/golang:1.17
- image: cimg/go:1.18
environment:
CGO_ENABLED: 0
mac:
Expand All @@ -27,7 +27,7 @@ commands:
# https://app.circleci.com/jobs/github/CircleCI-Public/circleci-cli/6480
# curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
# The issue seems to be on the server-side, so force HTTP 1.1
name: "cURL: Force HTTP 1.1"
name: 'cURL: Force HTTP 1.1'
command: echo '--http1.1' >> ~/.curlrc
build-docker-image:
steps:
Expand All @@ -51,7 +51,7 @@ commands:
- persist_to_workspace:
root: .
paths:
- "dist"
- 'dist'
- store_artifacts:
path: ./dist
destination: dist
Expand All @@ -72,7 +72,7 @@ commands:
gomod:
steps:
- restore_cache:
keys: ["v2-gomod-{{ arch }}-"]
keys: ['v2-gomod-{{ arch }}-']
- run:
name: Download go module dependencies
command: go mod download
Expand Down Expand Up @@ -104,8 +104,9 @@ jobs:
steps:
- checkout
- run: |
brew install [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
brew update
brew install [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
- gomod
- run: make test
build:
Expand All @@ -117,7 +118,7 @@ jobs:
- persist_to_workspace:
root: .
paths:
- "build"
- 'build'
cucumber:
docker:
- image: cimg/ruby:2.7
Expand All @@ -126,7 +127,7 @@ jobs:
- attach_workspace:
at: .
- run:
name: "Install CLI tool from workspace"
name: 'Install CLI tool from workspace'
command: sudo cp ~/project/build/linux/amd64/circleci /usr/local/bin/
- run:
command: bundle install
Expand Down
2 changes: 1 addition & 1 deletion .circleci/install-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ function error() {

trap error SIGINT

curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.35.2
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.46.2

command -v ./bin/golangci-lint
2 changes: 1 addition & 1 deletion cmd/orb_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ The following orb versions already exist:
`
actual, err := ioutil.ReadAll(&b)
Expect(err).ShouldNot(HaveOccurred())
Expect(fmt.Sprintf("%s", actual)).To(Equal(expOutput))
Expect(string(actual)).To(Equal(expOutput))
})
})

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ require (
// fix vulnerability: CVE-2020-15114 in etcd v3.3.10+incompatible
replace github.com/coreos/etcd => github.com/coreos/etcd v3.3.24+incompatible

go 1.17
go 1.18

0 comments on commit 897ebaf

Please sign in to comment.