aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-tests.sh
blob: 8b536a53f009460bc4c305de0818d4b1201f9be7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -e

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 python pin "$PYTHON_VERSION"
  uv sync --all-extras --all-groups
  uv run task test
}

main "$@"