Skip to content

Commit

Permalink
chore: update Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Aug 1, 2022
1 parent 393ab47 commit f4fc114
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/post-release.yml
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.18
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.19.0-rc.2

- name: Update GitHub action config
run: make assets/github-action-config.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-extra.yml
Expand Up @@ -13,8 +13,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.18
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.19.0-rc.2
- name: Run go list
run: go list -json -m all > go.list
- name: Nancy
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr.yml
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
GO_VERSION: 1.18
GO_VERSION: 1.19.0-rc.2

jobs:
# Check if there any dirty change for go mod tidy
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ env.GO_VERSION }}
- name: lint
uses: golangci/golangci-lint-action@v3.2.0
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make.exe test
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ env.GO_VERSION }} # test only the latest go version to speed up CI
- name: Run tests
run: make test
Expand All @@ -77,14 +77,14 @@ jobs:
strategy:
matrix:
golang:
- 1.17
- 1.18
- 1.19.0-rc.2
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ matrix.golang }}
- uses: actions/cache@v3
with:
Expand All @@ -108,7 +108,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: ${{ env.GO_VERSION }}
- name: Check generated files are up to date
run: make fast_check_generated
8 changes: 4 additions & 4 deletions .github/workflows/tag.yml
Expand Up @@ -14,8 +14,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.18
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.19.0-rc.2
- name: Unshallow
run: git fetch --prune --unshallow

Expand All @@ -41,8 +41,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
# stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.18
stable: 'false' # Keep this line to be able to use rc and beta version of Go (ex: 1.18.0-rc1).
go-version: 1.19.0-rc.2

- name: Unshallow
run: git fetch --prune --unshallow
Expand Down
6 changes: 3 additions & 3 deletions .golangci.reference.yml
Expand Up @@ -68,9 +68,9 @@ run:
allow-parallel-runners: false

# Define the Go version limit.
# Mainly related to generics support in go1.18.
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17
go: '1.18'
# Mainly related to generics support since go1.18.
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
go: '1.19'


# output configuration options
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.18 as builder
FROM golang:1.19 as builder

ARG VERSION
ARG SHORT_COMMIT
Expand All @@ -10,7 +10,7 @@ WORKDIR /golangci
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go

# stage 2
FROM golang:1.18
FROM golang:1.19
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
COPY --from=builder /golangci/golangci-lint /usr/bin/
CMD ["golangci-lint"]
4 changes: 2 additions & 2 deletions build/Dockerfile.alpine
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.18-alpine as builder
FROM golang:1.19-alpine as builder

ARG VERSION
ARG SHORT_COMMIT
Expand All @@ -15,7 +15,7 @@ RUN apk --no-cache add gcc musl-dev git mercurial
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go

# stage 2
FROM golang:1.18-alpine
FROM golang:1.19-alpine
# gcc is required to support cgo;
# git and mercurial are needed most times for go get`, etc.
# See https://github.com/docker-library/golang/issues/80
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module github.com/golangci/golangci-lint

go 1.18
go 1.19

require (
4d63.com/gochecknoglobals v0.1.0
Expand Down
6 changes: 3 additions & 3 deletions netlify.toml
@@ -1,21 +1,21 @@
[context.production.environment]
GO_VERSION = "1.18"
GO_VERSION = "1.19"
NODE_VERSION = "17"
# TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535
# NPM_FLAGS = "--legacy-peer-deps"
# NPM_FLAGS = "--force"
NPM_VERSION = "8.5.5"

[context.deploy-preview.environment]
GO_VERSION = "1.18"
GO_VERSION = "1.19"
NODE_VERSION = "17"
# TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535
# NPM_FLAGS = "--legacy-peer-deps"
# NPM_FLAGS = "--force"
NPM_VERSION = "8.5.5"

[context.branch-deploy.environment]
GO_VERSION = "1.18"
GO_VERSION = "1.19"
NODE_VERSION = "17"
# TODO https://github.com/golangci/golangci-lint/pull/2904#issuecomment-1146870535
# NPM_FLAGS = "--legacy-peer-deps"
Expand Down

0 comments on commit f4fc114

Please sign in to comment.