aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-08-13 22:15:53 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-08-13 22:15:53 -0400
commit177fa85c68ebbc9690f3c3b4417948242ee97c29 (patch)
tree659d50c3c0500a88b5de1142c46df3b39481e2c5
parentFix image syntax (diff)
downloadconfig-file-177fa85c68ebbc9690f3c3b4417948242ee97c29.zip
Adjust build script
-rw-r--r--.build.yml46
-rwxr-xr-xscripts/run-tests.sh32
-rwxr-xr-xscripts/setup-uv.sh6
3 files changed, 52 insertions, 32 deletions
diff --git a/.build.yml b/.build.yml
index 65a8930..52ca419 100644
--- a/.build.yml
+++ b/.build.yml
@@ -1,46 +1,28 @@
-image: alpine/3.22
+image: debian/trixie
packages:
- - uv
+ - python3
+ - python3-pip
+ - curl
+ - unzip
tasks:
+ - setup-uv: |
+ ./scripts/setup-uv.sh
+
- test-python38: |
- #!/bin/sh
- set -ex
- uv python install 3.8
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.8
- test-python39: |
- #!/bin/sh
- set -ex
- uv python install 3.9
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.9
- test-python310: |
- #!/bin/sh
- set -ex
- uv python install 3.10
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.10
- test-python311: |
- #!/bin/sh
- set -ex
- uv python install 3.11
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.11
- test-python312: |
- #!/bin/sh
- set -ex
- uv python install 3.12
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.12
- test-python313: |
- #!/bin/sh
- set -ex
- uv python install 3.13
- uv sync --all-extras
- uv run task test
+ ./scripts/run-tests.sh --python-version 3.13
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"