test: go mod tidy (#8) #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gofumpt | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
gofumpt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "1.18" | |
- name: Install gofumpt | |
run: go install mvdan.cc/[email protected] | |
- name: Check formatting with gofumpt | |
run: | | |
if [ -n "$(gofumpt -l .)" ]; then | |
echo "The following files are not formatted with gofumpt:" | |
gofumpt -l . | |
exit 1 | |
fi |