From 39a2affc53068eae50be44e50f42d21e881ede16 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Wed, 18 Sep 2024 13:06:24 +0600 Subject: [PATCH] chore: use checks bundle snapshot from trivy-action Signed-off-by: Nikita Pivkin --- .gitignore | 4 +++- Makefile | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bbee3410..2c0ef830 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ *.test !test/data/*.test trivyignores -.vscode/ \ No newline at end of file +.vscode/ + +.cache \ No newline at end of file diff --git a/Makefile b/Makefile index 49361e64..492a5e6e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,15 @@ -.PHONY: test +OS := $(shell uname) +ifeq ($(OS), Darwin) +BATS_LIB_PATH=/opt/homebrew/lib +endif +ifeq ($(OS), Linux) +BATS_LIB_PATH=/usr/local/lib/ +endif + +.PHONY: test test: - BATS_LIB_PATH=/usr/local/lib/ bats --recursive --timing --verbose-run . + mkdir -p .cache + BATS_LIB_PATH=$(BATS_LIB_PATH) GITHUB_REPOSITORY_OWNER=aquasecurity\ + TRIVY_CACHE_DIR=.cache TRIVY_DISABLE_VEX_NOTICE=true TRIVY_DEBUG=true\ + bats --recursive --timing --verbose-run .