Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add go1.22 support #660

Merged
merged 6 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bench-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os-version: ['ubuntu-22.04' ]
go-version: [ '1.20', '1.21' ]
go-version: [ '1.21', '1.22' ]
runs-on: ${{ matrix.os-version }}

steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
go-version: ['1.20', '1.21']
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:

strategy:
matrix:
go-version: ['1.20', '1.21']
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@v4
Expand All @@ -65,7 +65,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.20', '1.21' ]
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@v4
Expand All @@ -85,7 +85,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@v4
Expand All @@ -104,7 +104,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: ['1.21', '1.22']

steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/golint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.21'
# workaround: when the files to be extracted are already present, tar extraction in Golangci Lint fails with the "File exists"
go-version: '1.22'
# workaround: when the files to be extracted are already present,
# tar extraction in Golangci Lint fails with the "File exists"
# https://github.com/golangci/golangci-lint-action/issues/807
cache: false

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: "v1.55.2"
version: "v1.57.1"
args: --timeout 3m --verbose

2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/testing-dnstap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
unbound: [ '1.17.0', '1.18.0', '1.19.0' ]

mode: [ 'tcp' ]
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
coredns: [ '1.10.1', '1.11.1' ]
mode: [ 'tcp' ]

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
coredns: [ '1.11.1' ]
mode: [ 'tls' ]

Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
dnsdist: [ '17', '18', '19' ]

mode: [ 'dnstaptcp', 'dnstapunix' ]
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
dnsdist: [ '19' ]

steps:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/testing-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os-version: ['ubuntu-22.04' ] #, 'macos-latest'
go-version: [ '1.20', '1.21' ]
go-version: [ '1.21', '1.22' ]
package:
- '.'
- 'pkgconfig'
Expand Down Expand Up @@ -50,14 +50,14 @@ jobs:
run: |
go version
sudo go version

- name: Set up Go for root
if: runner.os != 'macOS'
run: |
which go
sudo which go
sudo ln -sf `which go` `sudo which go` || true

- name: Show Go version
run: |
go version
Expand All @@ -71,7 +71,7 @@ jobs:

strategy:
matrix:
go-version: ['1.20', '1.21']
go-version: [ '1.21', '1.22' ]
package: ['config', 'clientquery_dnstaptcp', 'clientquery_dnstapunix' ]

steps:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

strategy:
matrix:
go-version: ['1.21']
go-version: [ '1.21', '1.22' ]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- id: count_tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing-powerdns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
dnsdist: [ '17', '18', '19' ]

steps:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

strategy:
matrix:
go-version: [ '1.21' ]
go-version: [ '1.22' ]
recursor: [ '47', '48', '49' ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.5-alpine3.17 as builder
FROM golang:1.22.1-alpine3.19 as builder

ARG VERSION

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ goversion: check-go
@echo "Go version: $(GO_VERSION)"

# Installs project dependencies.
dep: check-go
dep: goversion
@go get github.com/dmachard/go-logger@v$(GO_LOGGER)
@go get github.com/dmachard/go-powerdns-protobuf@v$(GO_POWERDNS_PROTOBUF)
@go get github.com/dmachard/go-dnstap-protobuf@v$(GO_DNSTAP_PROTOBUF)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<img src="https://goreportcard.com/badge/github.com/dmachard/go-dns-collector" alt="Go Report"/>
<img src="https://img.shields.io/badge/go%20version-min%201.20-green" alt="Go version"/>
<img src="https://img.shields.io/badge/go%20version-min%201.21-green" alt="Go version"/>
<img src="https://img.shields.io/badge/go%20tests-446-green" alt="Go tests"/>
<img src="https://img.shields.io/badge/go%20bench-19-green" alt="Go bench"/>
<img src="https://img.shields.io/badge/go%20lines-40169-green" alt="Go lines"/>
Expand Down
Loading