Skip to content

Commit

Permalink
Detach test containers from STDIN
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKobayashi committed Sep 28, 2024
1 parent 51849bc commit a5b3065
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,15 @@ jobs:
# Test the built image
- name: Test image
run: |
set -ex
timeout --kill-after=30s --preserve-status 30s docker container run --rm ${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:test
set -x
apt-get install uuid-runtime
CONTAINER_ID="$(uuidgen)"
docker container run --attach stdout --attach stderr --init --name=$CONTAINER_ID --rm ${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:test &
sleep 60
docker container stop $CONTAINER_ID
# Remove the test image
- name: Remove test image
if: ${{ !cancelled() }}
run: |
set -x
docker image rm --force ${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:test

0 comments on commit a5b3065

Please sign in to comment.