[#1266] .forgejo: Make 'fumpt' job fail on changed files
All checks were successful
DCO action / DCO (pull_request) Successful in 1m20s
Vulncheck / Vulncheck (pull_request) Successful in 1m30s
Tests and linters / Run gofumpt (pull_request) Successful in 1m40s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m21s
Build / Build Components (pull_request) Successful in 2m32s
Tests and linters / Staticcheck (pull_request) Successful in 2m49s
Tests and linters / gopls check (pull_request) Successful in 2m51s
Tests and linters / Lint (pull_request) Successful in 3m38s
Tests and linters / Tests with -race (pull_request) Successful in 6m44s
Tests and linters / Tests (pull_request) Successful in 6m43s

`gofumpt` always returns an exit code of 0, even when it finds
misformatted files. To make `fumpt` action behave as expected
we need to check if `gofumpt` changed any files.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2024-09-13 15:44:23 +03:00
parent 546d09660f
commit 0a93738042

View file

@ -106,4 +106,6 @@ jobs:
run: make fumpt-install
- name: Run gofumpt
run: make fumpt
run: |
make fumpt
git diff --exit-code --quiet