From 050fca5beaf777be475061d2d65033dfe2dd6b2f Mon Sep 17 00:00:00 2001 From: Marcos Gaeta Date: Wed, 25 Sep 2024 13:49:19 -0600 Subject: [PATCH] better CI --- .github/workflows/ci.yaml | 6 +++--- .github/workflows/main.yaml | 6 +++--- .golangci.yml | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 502148bb..613be975 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - name: Run linters - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: latest args: --timeout=3m @@ -28,9 +28,9 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: go tests - run: go test -v -covermode=count -json ./... > test.json + run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json) - name: annotate go tests if: always() uses: guyarb/golang-test-annotations@v0.5.1 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b0c1ce13..120d11b5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,7 +14,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - name: Run linters - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: latest args: --timeout=3m @@ -31,9 +31,9 @@ jobs: with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: go tests - run: go test -v -covermode=count -json ./... > test.json + run: (set -o pipefail && go test -v -covermode=count -json ./... | tee test.json) - name: annotate go tests if: always() uses: guyarb/golang-test-annotations@v0.5.1 diff --git a/.golangci.yml b/.golangci.yml index 4f91ccf3..4ab47e29 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -70,9 +70,7 @@ linters: - bodyclose # checks whether HTTP response body is closed successfully - durationcheck # check for two durations multiplied together - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. - - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds - exhaustive # check exhaustiveness of enum switch statements - - exportloopref # checks for pointers to enclosing loop variables - forbidigo # Forbids identifiers - gochecknoinits # Checks that no init functions are present in Go code - goconst # Finds repeated strings that could be replaced by a constant