diff --git a/.github/workflows/non-regression.yml b/.github/workflows/non-regression.yml index 0c5e7ae40..fb6f0102d 100644 --- a/.github/workflows/non-regression.yml +++ b/.github/workflows/non-regression.yml @@ -19,7 +19,7 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: args: --timeout=240s unit-test-golang: diff --git a/.github/workflows/plugin_template.yml b/.github/workflows/plugin_template.yml index 45b45e14f..be9cd2140 100644 --- a/.github/workflows/plugin_template.yml +++ b/.github/workflows/plugin_template.yml @@ -34,10 +34,11 @@ jobs: uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: + version: v1.59.1 working-directory: plugins/${{ inputs.LOWER_NAME }} - args: --skip-dirs=override --timeout=240s + args: --exclude-dirs=override --timeout=240s - name: Run ${{ inputs.CAPITALIZED_NAME }} tests run: cd plugins/${{ inputs.LOWER_NAME }} && go test -v . diff --git a/Makefile b/Makefile index 42a5a95ff..1e0183029 100644 --- a/Makefile +++ b/Makefile @@ -144,9 +144,9 @@ generate-workflow: ## Generate plugin workflow bash .github/workflows/workflow_plugins_generator.sh golangci-lint: ## Run golangci-lint to ensure the code quality - docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v --timeout 180s ./... + docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run -v --timeout 180s ./... for plugin in $(PLUGINS_LIST) ; do \ - echo "Starting lint $$plugin \n" && docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v --skip-dirs=override --timeout 240s ./plugins/$$plugin; \ + echo "Starting lint $$plugin \n" && docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:v1.59.1 golangci-lint run -v --exclude-dirs=override --timeout 240s ./plugins/$$plugin; \ done cd plugins/caddy && go mod tidy && go mod download diff --git a/plugins/caddy/httpcache_test.go b/plugins/caddy/httpcache_test.go index 219ecd5ff..75d734968 100644 --- a/plugins/caddy/httpcache_test.go +++ b/plugins/caddy/httpcache_test.go @@ -1034,7 +1034,7 @@ func TestExpires(t *testing.T) { } } - cacheChecker(caddyTester, "/expires-only", "Hello, expires-only!", int(time.Until(expiresValue)-1)) + cacheChecker(caddyTester, "/expires-only", "Hello, expires-only!", int(time.Until(expiresValue).Seconds()-2)) cacheChecker(caddyTester, "/expires-with-max-age", "Hello, expires-with-max-age!", 59) cacheChecker(caddyTester, "/expires-with-s-maxage", "Hello, expires-with-s-maxage!", 4) } diff --git a/plugins/traefik/vendor/github.com/darkweak/souin/pkg/surrogate/providers/common.go b/plugins/traefik/vendor/github.com/darkweak/souin/pkg/surrogate/providers/common.go index 1c9c5816e..5ae49c91b 100644 --- a/plugins/traefik/vendor/github.com/darkweak/souin/pkg/surrogate/providers/common.go +++ b/plugins/traefik/vendor/github.com/darkweak/souin/pkg/surrogate/providers/common.go @@ -12,7 +12,6 @@ import ( "github.com/darkweak/souin/configurationtypes" "github.com/darkweak/souin/pkg/storage" "github.com/darkweak/souin/pkg/storage/types" - "github.com/darkweak/souin/pkg/surrogate/providers" ) const ( @@ -74,7 +73,7 @@ type keysRegexpInner struct { } type baseStorage struct { - parent providers.SurrogateInterface + parent SurrogateInterface Storage types.Storer Keys map[string]configurationtypes.SurrogateKeys keysRegexp map[string]keysRegexpInner