From bfeebb619aa377ca002da40bf36c24f08ea0d187 Mon Sep 17 00:00:00 2001 From: Sameh Abouel-saad Date: Thu, 9 Apr 2026 01:23:11 +0200 Subject: [PATCH] fix(ci): update bridge lint workflow for Go 1.21 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Go version: 1.20 → 1.21 (match go.mod requirement) - golangci-lint-action: v3.7.0 → v6 (supports Go 1.21+) - staticcheck-action: v1.3.0 → v1 (v1.3.0 bundled setup-go-faster with Go 1.19 which fails to install) - gofmt: replace Jerome1337/gofmt-action@v1.0.5 (unmaintained) with inline gofmt -l check --- .../070_lint_and_test_go_bridge.yaml | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/070_lint_and_test_go_bridge.yaml b/.github/workflows/070_lint_and_test_go_bridge.yaml index 7daee5d59..9195296d9 100644 --- a/.github/workflows/070_lint_and_test_go_bridge.yaml +++ b/.github/workflows/070_lint_and_test_go_bridge.yaml @@ -11,7 +11,7 @@ jobs: name: lint runs-on: ubuntu-latest timeout-minutes: 5 - steps: + steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 with: @@ -23,27 +23,29 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.21" cache: false - # cache-dependency-path: bridge/tfchain_bridge/go.sum id: go - name: golangci-lint - uses: golangci/golangci-lint-action@v3.7.0 + uses: golangci/golangci-lint-action@v6 with: args: --timeout 3m --verbose working-directory: bridge/tfchain_bridge - name: staticcheck - uses: dominikh/staticcheck-action@v1.3.0 + uses: dominikh/staticcheck-action@v1 with: version: "latest" working-directory: bridge/tfchain_bridge - env: - GO111MODULE: on - name: gofmt - uses: Jerome1337/gofmt-action@v1.0.5 - with: - gofmt-path: './bridge/tfchain_bridge' - gofmt-flags: "-l -d" + run: | + cd bridge/tfchain_bridge + UNFORMATTED=$(gofmt -l .) + if [ -n "$UNFORMATTED" ]; then + echo "Files not formatted:" + echo "$UNFORMATTED" + gofmt -d . + exit 1 + fi