-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We can't cache image as the free storage from GitHub is too small. Signed-off-by: spacewander <[email protected]>
- Loading branch information
1 parent
f9ce897
commit c7f6a6d
Showing
5 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
name: "pull request labeler" | ||
on: | ||
- pull_request_target | ||
# Disable this workflow for now until this repo is open source and GitHub doesn't charge us for CI | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/labeler@v4 | ||
with: | ||
dot: true | ||
#name: "pull request labeler" | ||
#on: | ||
#- pull_request_target | ||
|
||
#jobs: | ||
#triage: | ||
#permissions: | ||
#contents: read | ||
#pull-requests: write | ||
#runs-on: ubuntu-latest | ||
#steps: | ||
#- uses: actions/checkout@v4 | ||
#- uses: actions/labeler@v4 | ||
#with: | ||
#dot: true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
run: | ||
deadline: 10m | ||
deadline: 5m | ||
|
||
linters: | ||
enable: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,10 @@ ifeq ($(IN_CI), true) | |
MOUNT_GOMOD_CACHE = | ||
endif | ||
|
||
LOCALBIN ?= $(shell pwd)/bin | ||
$(LOCALBIN): | ||
@mkdir -p $(LOCALBIN) | ||
|
||
.PHONY: gen-proto | ||
gen-proto: build-dev-tools $(GO_TARGETS) | ||
# format the generated Go code so the `fmt-go` task can pass | ||
|
@@ -110,19 +114,22 @@ build-dev-tools: | |
fi | ||
|
||
.PHONY: lint-go | ||
lint-go: | ||
go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run --config=.golangci.yml | ||
lint-go: $(LOCALBIN) | ||
test -x $(LOCALBIN)/golangci-lint || GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
$(LOCALBIN)/golangci-lint run --config=.golangci.yml | ||
|
||
.PHONY: fmt-go | ||
fmt-go: | ||
fmt-go: $(LOCALBIN) | ||
go mod tidy | ||
go run github.com/rinchsan/gosimports/cmd/[email protected] -w -local ${PROJECT_NAME} . | ||
test -x $(LOCALBIN)/gosimports || GOBIN=$(LOCALBIN) go install github.com/rinchsan/gosimports/cmd/[email protected] | ||
$(LOCALBIN)/gosimports -w -local ${PROJECT_NAME} . | ||
|
||
# Don't use `buf format` to format the protobuf files! Buf's code style is different from Envoy. | ||
# That will break lots of things. | ||
.PHONY: lint-proto | ||
lint-proto: | ||
go run github.com/bufbuild/buf/cmd/[email protected] lint | ||
lint-proto: $(LOCALBIN) | ||
test -x $(LOCALBIN)/buf || GOBIN=$(LOCALBIN) go install github.com/bufbuild/buf/cmd/[email protected] | ||
$(LOCALBIN)/buf lint | ||
|
||
.PHONY: lint-spell | ||
lint-spell: build-dev-tools | ||
|
@@ -135,8 +142,9 @@ lint-spell-local: | |
codespell --skip '.git,.idea,test-envoy,go.mod,go.sum,*.svg' --check-filenames --check-hidden --ignore-words ./.ignore_words | ||
|
||
.PHONY: lint-editorconfig | ||
lint-editorconfig: | ||
go run github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected] | ||
lint-editorconfig: $(LOCALBIN) | ||
test -x $(LOCALBIN)/editorconfig-checker || GOBIN=$(LOCALBIN) go install github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected] | ||
$(LOCALBIN)/editorconfig-checker | ||
|
||
.PHONY: lint | ||
lint: lint-go lint-proto lint-spell lint-editorconfig | ||
|