Skip to content

Commit

Permalink
Check Docker image exists before running any test
Browse files Browse the repository at this point in the history
From within the `justfile`.
  • Loading branch information
StevenMaude committed May 28, 2024
1 parent 1b64daa commit 69e9483
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 69e9483

Please sign in to comment.