mirror of
https://github.com/anchore/grype
synced 2024-11-10 06:34:13 +00:00
Use snapshot build for pipeline CLI testing
Signed-off-by: Dan Luhring <dan.luhring@anchore.com>
This commit is contained in:
parent
49b04f13eb
commit
e93bf99d9d
2 changed files with 11 additions and 3 deletions
|
@ -92,3 +92,6 @@ jobs:
|
|||
|
||||
- name: Run integration tests
|
||||
run: make integration
|
||||
|
||||
- name: Run CLI tests
|
||||
run: make cli-linux
|
||||
|
|
11
Makefile
11
Makefile
|
@ -57,7 +57,7 @@ all: clean static-analysis test ## Run all checks (linting, license check, unit,
|
|||
@printf '$(SUCCESS)All checks pass!$(RESET)\n'
|
||||
|
||||
.PHONY: test
|
||||
test: unit validate-cyclonedx-schema integration acceptance-linux ## Run all tests (unit, integration, and linux acceptance tests )
|
||||
test: unit validate-cyclonedx-schema integration acceptance-linux cli-linux ## Run all tests (unit, integration, linux acceptance, and linux CLI tests)
|
||||
|
||||
help:
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(BOLD)$(CYAN)%-25s$(RESET)%s\n", $$1, $$2}'
|
||||
|
@ -133,8 +133,13 @@ integration: ## Run integration tests
|
|||
integration-fingerprint:
|
||||
find test/integration/test-fixtures/image-* -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum | tee test/integration/test-fixtures/cache.fingerprint
|
||||
|
||||
.PHONY: cli
|
||||
cli: ## Run CLI tests
|
||||
.PHONY: cli-linux
|
||||
cli-linux: $(SNAPSHOTDIR) ## Run CLI tests for Linux executable
|
||||
GRYPE_BINARY_LOCATION='snapshot/grype_linux_amd64/grype' \
|
||||
go test -count=1 -v ./test/cli
|
||||
|
||||
.PHONY: cli-macos
|
||||
cli-macos: $(SNAPSHOTDIR) ## Run CLI tests for macOS executable
|
||||
GRYPE_BINARY_LOCATION='snapshot/grype-macos_darwin_amd64/grype' \
|
||||
go test -count=1 -v ./test/cli
|
||||
|
||||
|
|
Loading…
Reference in a new issue