From 4632bf0ecd8850c6434552d00ebbf2ddc815c68b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 14 Jun 2022 14:31:18 -0700 Subject: [PATCH] Add explicit support to GitHub Actions scripts for ".test/config.sh" (and ".test/tests/xxx/") --- scripts/github-actions/generate.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/github-actions/generate.sh b/scripts/github-actions/generate.sh index 1e2d3bd9..99f3b13d 100755 --- a/scripts/github-actions/generate.sh +++ b/scripts/github-actions/generate.sh @@ -96,7 +96,14 @@ for tag in $tags; do | join(" ") ), history: ("docker history " + (.tags[0] | @sh)), - test: ("~/oi/test/run.sh " + (.tags[0] | @sh)), + test: ( + [ + "set -- " + (.tags[0] | @sh), + # https://github.com/docker-library/bashbrew/issues/46#issuecomment-1152567694 (allow local test config / tests) + "if [ -s ./.test/config.sh ]; then set -- --config ~/oi/test/config.sh --config ./.test/config.sh \"$@\"; fi", + "~/oi/test/run.sh \"$@\"" + ] | join("\n") + ), }, } '