aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run-tests.sh32
-rwxr-xr-xscripts/setup-uv.sh6
2 files changed, 38 insertions, 0 deletions
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
new file mode 100755
index 0000000..4dbe4d3
--- /dev/null
+++ b/scripts/run-tests.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -ex
+
+PYTHON_VERSION=""
+
+main() {
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ --python-version)
+ shift
+ PYTHON_VERSION="$1"
+ ;;
+ *)
+ echo "Unknown argument: $1"
+ exit 1
+ ;;
+ esac
+ shift
+ done
+
+ if [ -z "$PYTHON_VERSION" ]; then
+ echo "Error: --python-version must be provided"
+ exit 1
+ fi
+
+ uv python install "$PYTHON_VERSION"
+ uv use "$PYTHON_VERSION"
+ uv sync --all-extras
+ uv run task test
+}
+
+main "$@"
diff --git a/scripts/setup-uv.sh b/scripts/setup-uv.sh
new file mode 100755
index 0000000..f8e4031
--- /dev/null
+++ b/scripts/setup-uv.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -ex
+python3 -m pip install --user pipx
+python3 -m pipx ensurepath
+pipx install uv
+export PATH="$HOME/.local/bin:$PATH"