-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more commands to the Makefile and use them in CI (#24)
* Add more commands to the Makefile and use them in CI Signed-off-by: Philippe Martin <phmartin@redhat.com> * Make check_registry.sh executable Signed-off-by: Philippe Martin <phmartin@redhat.com> * Move scripts to ./scripts directory Signed-off-by: Philippe Martin <phmartin@redhat.com> --------- Signed-off-by: Philippe Martin <phmartin@redhat.com>
- Loading branch information
Showing
5 changed files
with
26 additions
and
11 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
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 |
---|---|---|
|
@@ -32,4 +32,4 @@ jobs: | |
id: build | ||
run: | | ||
make build | ||
bash test/check_registry/check_registry.sh | ||
make check_registry |
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,19 +1,35 @@ | ||
.PHONY: help | ||
help: ## Show this help | ||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
||
.PHONY: gomod_tidy | ||
gomod_tidy: | ||
gomod_tidy: ## Update Go mod dependencies | ||
go mod tidy | ||
|
||
.PHONY: gofmt | ||
gofmt: | ||
gofmt: ## Run Go formatting checks | ||
go fmt -x ./... | ||
|
||
.PHONY: build | ||
build: | ||
build: ## Build executable without extension (Unix) | ||
go build -o alizer | ||
|
||
.PHONY: buildWin | ||
buildWin: | ||
buildWin: ## Build executable with Windows .exe extension | ||
go build -o alizer.exe | ||
|
||
.PHONY: test | ||
test: | ||
go test -coverprofile cover.out -v ./... | ||
test: ## Run unit tests with coverage | ||
go test -coverprofile cover.out -v ./... | ||
|
||
.PHONY: check_registry | ||
check_registry: ## Run registry checks | ||
./test/check_registry/check_registry.sh | ||
|
||
.PHONY: gosec_install | ||
gosec_install: ## Install gosec utility | ||
go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0 | ||
|
||
.PHONY: gosec | ||
gosec: ## Run go security checks | ||
./scripts/run_gosec.sh |
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
Empty file.