scripts: add a test runner
- ID
35529fc- date
2026-04-20 04:44:11+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
174bfbd- message
scripts: add a test runner- changed files
1 file, 16 additions
Changed files
scripts/run_snippets_tests.sh (0) → scripts/run_snippets_tests.sh (304)
diff --git a/scripts/run_snippets_tests.sh b/scripts/run_snippets_tests.sh
new file mode 100755
index 0000000..4cd1700
--- /dev/null
+++ b/scripts/run_snippets_tests.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+
+# Print a command in blue, then run the command
+run_command() {
+ echo ""
+ echo -e "\033[34m-> $@\033[0m"
+ bash -c "$@"
+}
+
+run_command 'ruff format'
+run_command 'ruff check *.py'
+run_command 'mypy *.py'
+run_command 'python3 create_snippets.py'