From 60fd56748f6ddd574bd96e34933e3d265b72c591 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 5 Apr 2022 01:35:35 +0300 Subject: [PATCH] Update the script for testing in docker container: - don't require bash - mark appimage stage - use --no-cache if docker build fails - remove container after running the tests - use tty for colorful output --- run-tests-in-docker.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/run-tests-in-docker.sh b/run-tests-in-docker.sh index 9fa9bfcc..174cb754 100755 --- a/run-tests-in-docker.sh +++ b/run-tests-in-docker.sh @@ -1,5 +1,13 @@ -#!/bin/bash +#!/bin/sh -docker build --target travis -t pybm -f packages/docker/Dockerfile.bionic . -docker run pybm +DOCKERFILE=packages/docker/Dockerfile.bionic +# explicitly mark appimage stage because it builds in any case +docker build --target appimage -t pybm/appimage -f $DOCKERFILE . + +if [ $? -gt 0 ]; then + docker build --no-cache --target appimage -t pybm/appimage -f $DOCKERFILE . +fi + +docker build --target tox -t pybm/tox -f $DOCKERFILE . +docker run --rm -t pybm/tox