From 7f0a3d56ee6405a4ec52beab8131516a26a87dc7 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 7 Feb 2024 22:20:12 +0100 Subject: [PATCH] chore: update CI, and linter --- .github/workflows/go-cross.yml | 4 ++-- .github/workflows/main.yml | 6 +++--- .golangci.yml | 5 +++-- client_test.go | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go-cross.yml b/.github/workflows/go-cross.yml index 8a4e09e..9969c8c 100644 --- a/.github/workflows/go-cross.yml +++ b/.github/workflows/go-cross.yml @@ -18,11 +18,11 @@ jobs: # https://github.com/marketplace/actions/checkout - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # https://github.com/marketplace/actions/setup-go-environment - name: Set up Go ${{ matrix.go-version }} - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b2426e..b3005c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,20 +15,20 @@ jobs: runs-on: ubuntu-latest env: GO_VERSION: stable - GOLANGCI_LINT_VERSION: v1.54.1 + GOLANGCI_LINT_VERSION: v1.56.0 CGO_ENABLED: 0 steps: # https://github.com/marketplace/actions/checkout - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # https://github.com/marketplace/actions/setup-go-environment - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ env.GO_VERSION }} diff --git a/.golangci.yml b/.golangci.yml index dd7c7ac..9e0ae8b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,5 +1,6 @@ run: - deadline: 5m + timeout: 5m + show-stats: true skip-files: [ ] skip-dirs: [ ] @@ -82,7 +83,7 @@ linters: issues: exclude-use-default: false - max-per-linter: 0 + max-issues-per-linter: 0 max-same-issues: 0 exclude: - 'ST1000: at least one file in a package should have a package comment' diff --git a/client_test.go b/client_test.go index aacde45..07d2544 100644 --- a/client_test.go +++ b/client_test.go @@ -153,7 +153,7 @@ func TestClient_DeleteRecord_apiError(t *testing.T) { err := client.DeleteRecord(context.Background(), "example.com", 1) statusE := &ServerError{} - assert.ErrorAs(t, err, &statusE) + require.ErrorAs(t, err, &statusE) assert.Equal(t, http.StatusServiceUnavailable, statusE.StatusCode) }