Skip to content

[CICD] Move gofumpt check to CICD, add cache #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .github/workflows/cli-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- run: go run ./cmd/devbox run fmt
- run: go run ./cmd/devbox run fmt && git diff --exit-code
- name: golangci-lint
uses: golangci/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
go: "1.20"
go: "1.21"
linters:
disable-all: true
enable:
Expand Down
11 changes: 0 additions & 11 deletions devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@
"mkdir -p dist/tools",
"export GOBIN=\"$PWD/dist/tools\"",
"go install mvdan.cc/gofumpt@latest",
"if [ -n \"${CI:-}\" ]; then",
" unformatted=\"$(find . -name '*.go' -exec \"$GOBIN/gofumpt\" -l {} \\+ | awk '{ print \"\t\" $0 }')\"",
" if [ -n \"$unformatted\" ]; then",
" echo 'The following files need to be formatted with gofumpt:'",
" echo",
" echo \"$unformatted\"",
" echo",
" echo 'Run `devbox run fmt` to format them.'",
" exit 1",
" fi",
"fi",
"find . -name '*.go' -exec \"$GOBIN/gofumpt\" -extra -w {} \\+"
],
"test": "go test -race -cover ./...",
Expand Down