From d6b62d8df1adbd83d60736c1c5eb68801273d6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20V=C3=AEjial=C4=83?= Date: Fri, 8 Sep 2023 01:00:15 +0300 Subject: [PATCH] fix ci scripts: check for docker -t --- .run.docker.sh | 9 ++++++++- docs/source/developing.md | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.run.docker.sh b/.run.docker.sh index e61eec35..f5dc290f 100755 --- a/.run.docker.sh +++ b/.run.docker.sh @@ -4,12 +4,19 @@ export DOCKER_IMG=redun_python_test:redun_python_test export DOCKER_CONTAINER_NAME=redun_python_test docker build . --tag $DOCKER_IMG >/dev/null +docker-compose up -d ( docker rm -f $DOCKER_CONTAINER_NAME || true ) 2>&1 >/dev/null +if [ -t 0 ]; then + TERM="-i -t" +else + TERM="-i " +fi + docker run \ -u "$(id -u):$(id -g)" \ - -it \ + $TERM \ --rm \ --name $DOCKER_CONTAINER_NAME \ -e PGUSER=postgres -e PGPASSWORD=postgres \ diff --git a/docs/source/developing.md b/docs/source/developing.md index 40130556..b1301a05 100644 --- a/docs/source/developing.md +++ b/docs/source/developing.md @@ -9,7 +9,7 @@ tocpdeth: 3 Run `./pytest.sh` with the arguments that you would pass to `pytest`, for example: ``` -./pytest.sh -k static +./pytest.sh -k static --pdb ``` The lints also have their own shortcut: `./lint.sh`