diff --git a/.gitignore b/.gitignore index 63bd79f..2f406ab 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ _ignore bin/ dev/ +_temp/ # Temporary files *.tmp diff --git a/justfile b/justfile index f1842f8..00dde3c 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ just --list --unsorted # Run all build-related recipes in the justfile -run-all: install-deps format-python check-python check-spelling check-commits +run-all: install-deps format-python check-python check-spelling check-commits test # Install the pre-commit hooks install-precommit: @@ -41,3 +41,24 @@ check-commits: # Check for spelling errors in files check-spelling: uv run typos + +test: + #!/bin/zsh + temp_dir="_temp/test-data-package" + rm -rf $temp_dir + mkdir -p $temp_dir + # vcs-ref means the current commit/head, not a tag. + # `.` means the current directory contains the template. + uvx copier copy --vcs-ref=HEAD . $temp_dir \ + --defaults \ + --data package_abbrev= "test-data-package" \ + --data package_github="first-last/test-data-package" \ + --data author_given_name="First" \ + --data author_family_name="Last" \ + --data author_email="first.last@example.com" + # TODO: Other checks/tests? + +cleanup: + #!/bin/zsh + temp_dir=$("_temp/test-data-package")) + rm -rf $temp_dir