diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 217ebf7..627f35e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,18 @@ jobs: - uses: astral-sh/setup-uv@v3 - run: ./script/test.sh go + test-go-legacy-cog: + name: Test Go with legacy Cog + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: astral-sh/setup-uv@v3 + - run: ./script/test.sh go -legacy-cog + build-python: name: Build & verify python package runs-on: ubuntu-latest diff --git a/script/test.sh b/script/test.sh index d661109..9ffa9a0 100755 --- a/script/test.sh +++ b/script/test.sh @@ -9,31 +9,31 @@ base_dir="$(git rev-parse --show-toplevel)" cd "$base_dir" test_go() { - go test ./... + go test ./... "$@" } test_python() { cd "$base_dir/python" uv sync --all-extras - .venv/bin/pytest + .venv/bin/pytest "$@" } if [ $# -eq 0 ]; then test_go test_python else - for c in "$@"; do - case "$c" in - go) - test_go - ;; - python) - test_python - ;; - *) - echo "Unknown test $c" - exit 1 - ;; - esac - done + t=$1 + shift + case "$t" in + go) + test_go "$@" + ;; + python) + test_python "$@" + ;; + *) + echo "Unknown test $t" + exit 1 + ;; + esac fi