From d4b6f246e6a16110650a57185b3d9b5acb579cf1 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Sat, 6 Apr 2024 22:32:02 +0200 Subject: move ci --- .scripts.d/30-test.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .scripts.d/30-test.sh (limited to '.scripts.d/30-test.sh') diff --git a/.scripts.d/30-test.sh b/.scripts.d/30-test.sh new file mode 100644 index 0000000..4ec890d --- /dev/null +++ b/.scripts.d/30-test.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# vim: ai:ts=8:sw=8:noet +set -EeufCo pipefail +export SHELLOPTS # propagate set to children by default +IFS=$'\t\n' + +# check required commands are in place +command -v docker >/dev/null 2>&1 || { + echo 'please install docker-client' + exit 1 +} + +# install goss +curl -fsSL https://goss.rocks/install | sh + +export GOSS_SLEEP=${GOSS_SLEEP:-5} +export GOSS_VARS=${GOSS_VARS:-} +export CONTAINER_LOG_OUTPUT=${CONTAINER_LOG_OUTPUT:-} + +# The default 'mount' strategy uses 'sleep infinity' to keep +# the container alive. If there's an ENTRYPOINT or CMD, use 'cp' +# instead to prevent dgoss from overriding it. +if grep -qE '^(ENTRYPOINT|CMD)' Dockerfile; then + export GOSS_FILES_STRATEGY=cp +fi + +goss --gossfile goss.yaml render >goss-full.yaml +mv goss-full.yaml goss.yaml + +dgoss run "chn2guevara/languagetool:${BUILD_ID}" -- cgit v1.2.3