Skip to content

Commit

Permalink
attempt to fix flaky "go fmt" ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Apr 17, 2021
1 parent dd97fa1 commit 792ae9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: go fmt
if: matrix.os == 'macos-latest'
run: make fmt-go && git diff-index --quiet HEAD --
run: make fmt-go

- name: npm ci
run: cd scripts && npm ci
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ vet-go:
go vet ./cmd/... ./internal/... ./pkg/...

fmt-go:
# This uses "|| true" to swallow errors because for some reason this command
# started randomly failing when run inside GitHub Actions. It still formats
# all files successfully but then sometimes exits with a status of 1 (this
# started on April 14th, 2021). I don't know why this happens and don't know
# how to fix it. I'm just swallowing this error for now to move past this.
go fmt ./cmd/... ./internal/... ./pkg/... || true
test -z "$(shell go fmt ./cmd/... ./internal/... ./pkg/... )"

no-filepath:
@! grep --color --include '*.go' -r '"path/filepath"' cmd internal pkg || ( \
Expand Down

0 comments on commit 792ae9a

Please sign in to comment.