-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: Have CI check that
make clobber
works for everything we do…
… in CI [ci-skip] This is marked [ci-skip] because (as this PR reveals) `make clobber` is currently broken. Signed-off-by: Luke Shumaker <[email protected]>
- Loading branch information
Showing
8 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: 'Post-job actions' | ||
description: >- | ||
Perform generic post-job actions that should be performed for every | ||
job. | ||
inputs: | ||
jobname: | ||
default: ${{ github.job }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/actions/collect-logs | ||
if: always() | ||
with: | ||
jobname: ${{ inputs.jobname }} | ||
|
||
- name: "Check that the job didn't change any files" | ||
uses: ./.github/actions/git-dirty-check | ||
|
||
- run: make ci/teardown-k3d | ||
shell: bash | ||
|
||
# `make clean` | ||
- run: make clean | ||
shell: bash | ||
- name: "Check that `make clean` didn't change any files" | ||
uses: ./.github/actions/git-dirty-check | ||
# There's no way to test that `make clean` did everything it was | ||
# supposed to, since it's a 90% solution for `make clobber` | ||
|
||
# `make clobber` | ||
- run: make clobber | ||
shell: bash | ||
- name: "Check that `make clobber` didn't change any files" | ||
uses: ./.github/actions/git-dirty-check | ||
- name: "Check that `make clobber` did everything it's supposed to" | ||
shell: bash | ||
run: $GITHUB_ACTION_PATH/check-clobber.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
#shellcheck disable=SC2016 | ||
|
||
r=0 | ||
if [[ -n "$(git clean --dry-run -d -x)" ]]; then | ||
echo | ||
echo 'There are files that `make clobber` did not remove that it should have:' | ||
git clean --dry-run -d -x | sed 's/^Would remove / /' | ||
echo | ||
r=1 | ||
fi | ||
if docker image list --format='{{ .Repository }}:{{ .Tag }}' | grep -q '\.local/'; then | ||
echo | ||
echo 'There are Docker images that `make clobber` did not remove that it should have:' | ||
docker image list | grep '\.local/' | ||
echo | ||
r=1 | ||
fi | ||
if [[ -n "$(docker container list --all --quiet)" ]]; then | ||
echo | ||
echo 'There are Docker containers that `make clobber` did not remove:' | ||
docker container list --all | ||
echo | ||
r=1 | ||
fi | ||
if [[ -n "$(docker volume list --quiet)" ]]; then | ||
echo | ||
echo 'There are Docker volumes that `make clobber` did not remove:' | ||
docker volume list | ||
echo | ||
r=1 | ||
fi | ||
exit "$r" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters