From 69e948309f669c330d60fa453b521f4d8b75cc9d Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Tue, 28 May 2024 13:31:41 +0100 Subject: [PATCH] Check Docker image exists before running any test From within the `justfile`. --- justfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 20a34a0..ad3f962 100644 --- a/justfile +++ b/justfile @@ -7,11 +7,15 @@ default: build: docker build . -t research-template -test-smoke: +check-image-exists: + # Extra brackets are for Just escaping. + docker image inspect --format='{{{{.Id}}}}' research-template + +test-smoke: check-image-exists docker run --rm research-template ls /opt/venv/bin/python3.10 -test-packages: +test-packages: check-image-exists tests/packages.sh -test-rstudio: +test-rstudio: check-image-exists docker run -i --entrypoint /bin/bash research-template < ./tests/r_studio.sh