diff options
author | Christian Segundo | 2024-04-06 22:32:02 +0200 |
---|---|---|
committer | Christian Segundo | 2024-04-07 03:35:46 +0200 |
commit | d4b6f246e6a16110650a57185b3d9b5acb579cf1 (patch) | |
tree | 98cf60468de04f1b70429a229072270dca6c6a98 /.scripts.d/30-test.sh | |
parent | 6e7734ff026b5be928703a4ad31ba4abaaf1535b (diff) | |
download | languagetool-d4b6f246e6a16110650a57185b3d9b5acb579cf1.tar.gz |
move ci
Diffstat (limited to '.scripts.d/30-test.sh')
-rw-r--r-- | .scripts.d/30-test.sh | 30 |
1 files changed, 30 insertions, 0 deletions
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}" |