Skip to content

Commit c4d2267

Browse files
authored
build: 🔨 add test template recipe to justfile (#69)
# Description Adds a `test` recipe so we can test out building it and looking how it works. Closes #68 This PR needs an in-depth review.
1 parent c05803b commit c4d2267

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
_ignore
33
bin/
44
dev/
5+
_temp/
56

67
# Temporary files
78
*.tmp

justfile

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
just --list --unsorted
33

44
# Run all build-related recipes in the justfile
5-
run-all: install-deps format-python check-python check-spelling check-commits
5+
run-all: install-deps format-python check-python check-spelling check-commits test
66

77
# Install the pre-commit hooks
88
install-precommit:
@@ -41,3 +41,24 @@ check-commits:
4141
# Check for spelling errors in files
4242
check-spelling:
4343
uv run typos
44+
45+
test:
46+
#!/bin/zsh
47+
temp_dir="_temp/test-data-package"
48+
rm -rf $temp_dir
49+
mkdir -p $temp_dir
50+
# vcs-ref means the current commit/head, not a tag.
51+
# `.` means the current directory contains the template.
52+
uvx copier copy --vcs-ref=HEAD . $temp_dir \
53+
--defaults \
54+
--data package_abbrev= "test-data-package" \
55+
--data package_github="first-last/test-data-package" \
56+
--data author_given_name="First" \
57+
--data author_family_name="Last" \
58+
--data author_email="[email protected]"
59+
# TODO: Other checks/tests?
60+
61+
cleanup:
62+
#!/bin/zsh
63+
temp_dir=$("_temp/test-data-package"))
64+
rm -rf $temp_dir

0 commit comments

Comments
 (0)