From 7cf8304cf57dc8200a82f59ff57f62b944cff762 Mon Sep 17 00:00:00 2001 From: Eric Smalling Date: Fri, 28 Jan 2022 14:07:52 -0600 Subject: [PATCH] Add basic smoke test There's probably a much better way to do this than just sleeping for app warmup but this should work for now. --- .github/workflows/docker-image.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 208cc5fe97..6cf9e583e3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -19,10 +19,20 @@ jobs: - name: Build uses: docker/build-push-action@v2 with: + load: true context: todolist-goof push: false tags: java-goof:latest + + - name: Run container + run: docker run -d --rm --name java-goof -p 8080:8080 java-goof:latest + - name: Smoke test container + run: sleep 5 && curl -s --retry 5 --retry-delay 1 --retry-max-time 30 http://localhost:8080/todolist/ + + - name: Cleanup container + run: docker kill java-goof + build-log4shell-server-image: runs-on: ubuntu-latest defaults: