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
20 changes: 15 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Build
run: ./build.sh
- name: Test
run: ./test.sh
- name: Check Go formatting (gofmt)
shell: bash
run: |
GO_FILES=$(find . -name '*.go' -not -path "./vendor/*")
UNFORMATTED_FILES=$(gofmt -l $GO_FILES)
if [ -n "$UNFORMATTED_FILES" ]; then
echo "Go files are not formatted. Please run 'gofmt -w .' on your code."
gofmt -d $UNFORMATTED_FILES
exit 1
fi
echo "All Go files are correctly formatted."
- name: Run linter
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
with:
version: v1.55.1
args: -E=gofmt --timeout=30m0s
version: v2.6.2
Loading