Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libcnb-test: Test container, volume and image cleanup in CI #740

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,29 @@ jobs:
- name: Run integration tests
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
run: cargo test -- --ignored
- name: Check libcnb-test has cleaned up test containers, volumes and images
run: |
if [[ -n "$(docker ps --all --quiet)" ]]; then
docker ps --all
echo "Unexpected Docker containers left behind!"
# TODO: Fix container cleanup and make this fail
# https://github.com/heroku/libcnb.rs/issues/737
# exit 1
fi

if [[ -n "$(docker volume ls --quiet)" ]]; then
docker volume ls
echo "Unexpected Docker volumes left behind!"
# TODO: Fix volume cleanup and make this fail
# https://github.com/heroku/libcnb.rs/issues/570
# exit 1
fi

if [[ -n "$(docker images --all --quiet '*libcnb*')" ]]; then
docker images --all '*libcnb*'
echo "Unexpected Docker images left behind!"
exit 1
fi
- name: Compile and package examples/basics
run: cargo run --package libcnb-cargo -- libcnb package
working-directory: ./examples/basics
Expand Down