Skip to content

Commit

Permalink
Add PR check for cleaning up database cluster dir
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Jun 12, 2024
1 parent 1354fe5 commit c8fb403
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/__cleanup-db-cluster-dir.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions pr-checks/checks/cleanup-db-cluster-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Clean up database cluster directory"
description: "The database cluster directory is cleaned up if it is not empty."
operatingSystems: ["ubuntu"]
versions: ["linked"]
steps:
- name: Add a file to the database cluster directory
run: |
mkdir -p "${{ runner.temp }}/customDbLocation/javascript"
touch "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt"
- uses: ./../action/init
id: init
with:
build-mode: none
db-location: "${{ runner.temp }}/customDbLocation"
languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Validate file cleaned up
run: |
if [[ -f "${{ runner.temp }}/customDbLocation/javascript/a-file-to-clean-up.txt" ]]; then
echo "File was not cleaned up"
exit 1
fi
echo "File was cleaned up"

0 comments on commit c8fb403

Please sign in to comment.