Skip to content

Commit

Permalink
3945 feat: HDNS update go version to 1.19 and 1.20 (#114)
Browse files Browse the repository at this point in the history
* 3945 feat: HDNS update go version to 1.19 and 1.20

* feat: lint with modern 1.19 version

* fix: update go.sum (go mod tidy)

* fix: check only newer versions

* fix: UT

* feat: httbin dockerized

* fix: modify httpbin docker url

* fix: port of httpbin in health-cmd

* fix: restablish httpbin port to 80

* fix: suppress by now healthcheck in local httpbin

* fix: change host header to localhost

* fix: UT to be dual

* fix: alternative error properties

* fix: UT DoT

* fix: UT in DoT add Name

* fix: UT DoT Server

* fix: golangci-lint version update

* fix: update actions and remove healthcheck commented

* fix: update dependencies

* fix: update go version in sonarcloud

* fix: go version to compatibilize with golangci-lint

* fix: go version to latest successful

* fix: codecov-action downgrade to v2 from v3.1.3

* fix: downgrade AdguarTeam
  • Loading branch information
mariolg authored Apr 26, 2023
1 parent c393f0e commit 6e748d1
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 243 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.17", "1.18"]
go-version: ["1.19", "1.20"]

env:
AWS_ACCESS_KEY_ID: minioadmin
Expand Down Expand Up @@ -55,7 +55,6 @@ jobs:
--health-timeout 5s
--health-retries 5
minio:
image: lazybit/minio
ports:
Expand All @@ -67,12 +66,16 @@ jobs:
- ${{ github.workspace }}/../data:/data
options: --name=minio --health-cmd "curl http://localhost:9000/minio/health/live"


httpbin:
image: kennethreitz/httpbin
ports:
- 80:80

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.5.2

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ permissions:
# pull-requests: read

env:
GOLANGCI_LINT_VERSION: v1.46.2
GOLANGCI_LINT_VERSION: v1.52.2

jobs:
analysis:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.5.2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.17
go-version: 1.19
- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v test/acceptance` -json > test-report.out
- name: Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3.1.3

- name: Golangci increment
if: "!contains(github.ref, 'master')"
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.17-alpine3.14
FROM golang:1.20-alpine3.17
RUN apk add build-base

WORKDIR /github.com/TelefonicaTC2Tech/golium
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GO_PATH:=$(shell go env GOPATH)

LINTER_ARGS = run -c .golangci.yml --timeout 5m
GODOG_FORMAT = pretty
GOLANGCI_LINT_VERSION = v1.46.2
GOLANGCI_LINT_VERSION = v1.52.2

.PHONY: help
help: ## Show a list of available commands
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ services:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data
httpbin:
image: kennethreitz/httpbin
ports:
- 80:80
golium:
build:
context: .
Expand All @@ -30,3 +34,4 @@ services:
- rabbit
- elasticsearch
- minio
- httpbin
43 changes: 21 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/TelefonicaTC2Tech/golium

go 1.18
go 1.20

require (
bou.ke/monkey v1.0.2
github.com/AdguardTeam/dnsproxy v0.41.2
github.com/AdguardTeam/dnsproxy v0.48.0
github.com/aws/aws-sdk-go-v2 v1.16.6
github.com/aws/aws-sdk-go-v2/config v1.15.12
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.17
Expand All @@ -15,26 +15,25 @@ require (
github.com/elastic/go-elasticsearch/v7 v7.12.0
github.com/go-redis/redis/v8 v8.8.0
github.com/google/uuid v1.2.0
github.com/jarcoal/httpmock v1.2.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/lestrrat-go/jwx v1.1.4
github.com/miekg/dns v1.1.44
github.com/miekg/dns v1.1.50
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.0
github.com/spf13/pflag v1.0.5
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.2
github.com/tidwall/gjson v1.13.0
github.com/tidwall/sjson v1.2.4
github.com/xeipuuv/gojsonschema v1.2.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/AdguardTeam/golibs v0.10.6 // indirect
github.com/AdguardTeam/golibs v0.13.0 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 // indirect
github.com/ameshkov/dnscrypt/v2 v2.2.3 // indirect
github.com/ameshkov/dnscrypt/v2 v2.2.6 // indirect
github.com/ameshkov/dnsstamps v1.0.3 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.12.7 // indirect
Expand All @@ -50,7 +49,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/sso v1.11.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.8 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cheekybits/genny v1.0.0 // indirect
github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 // indirect
Expand All @@ -59,6 +57,8 @@ require (
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/goccy/go-json v0.4.7 // indirect
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20230111200839-76d1ae5aea2b // indirect
github.com/hashicorp/go-immutable-radix v1.3.0 // indirect
github.com/hashicorp/go-memdb v1.3.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
Expand All @@ -68,27 +68,26 @@ require (
github.com/lestrrat-go/iter v1.0.0 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/lestrrat-go/pdebug/v3 v3.0.1 // indirect
github.com/lucas-clemente/quic-go v0.26.0 // indirect
github.com/magefile/mage v1.10.0 // indirect
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/ginkgo/v2 v2.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
github.com/quic-go/quic-go v0.33.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opentelemetry.io/otel v0.19.0 // indirect
go.opentelemetry.io/otel/metric v0.19.0 // indirect
go.opentelemetry.io/otel/trace v0.19.0 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.8 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/exp v0.0.0-20230306221820-f0f767cdffd6 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/tools v0.6.0 // indirect
)
Loading

0 comments on commit 6e748d1

Please sign in to comment.