Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/070_lint_and_test_go_bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Loading