Skip to content

Commit 2c46e11

Browse files
committed
Add CI for legacy Cog tests
1 parent 9c0f9bf commit 2c46e11

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.github/workflows/ci.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
check-go:
1919
name: Check Go
20-
runs-on: ubuntu-latest-4-cores
20+
runs-on: ubuntu-latest
2121
strategy:
2222
fail-fast: false
2323
steps:
@@ -29,7 +29,7 @@ jobs:
2929

3030
test-go:
3131
name: Test Go
32-
runs-on: ubuntu-latest
32+
runs-on: ubuntu-latest-4-cores
3333
strategy:
3434
fail-fast: false
3535
steps:
@@ -39,6 +39,18 @@ jobs:
3939
- uses: astral-sh/setup-uv@v3
4040
- run: ./script/test.sh go
4141

42+
test-go-legacy-cog:
43+
name: Test Go with legacy Cog
44+
runs-on: ubuntu-latest-16-cores
45+
strategy:
46+
fail-fast: false
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0
51+
- uses: astral-sh/setup-uv@v3
52+
- run: ./script/test.sh go -legacy-cog
53+
4254
build-python:
4355
name: Build & verify python package
4456
runs-on: ubuntu-latest

script/test.sh

+16-16
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ base_dir="$(git rev-parse --show-toplevel)"
99
cd "$base_dir"
1010

1111
test_go() {
12-
go test ./...
12+
go test ./... "$@"
1313
}
1414

1515
test_python() {
1616
cd "$base_dir/python"
1717
uv sync --all-extras
18-
.venv/bin/pytest
18+
.venv/bin/pytest "$@"
1919
}
2020

2121
if [ $# -eq 0 ]; then
2222
test_go
2323
test_python
2424
else
25-
for c in "$@"; do
26-
case "$c" in
27-
go)
28-
test_go
29-
;;
30-
python)
31-
test_python
32-
;;
33-
*)
34-
echo "Unknown test $c"
35-
exit 1
36-
;;
37-
esac
38-
done
25+
t=$1
26+
shift
27+
case "$t" in
28+
go)
29+
test_go "$@"
30+
;;
31+
python)
32+
test_python "$@"
33+
;;
34+
*)
35+
echo "Unknown test $t"
36+
exit 1
37+
;;
38+
esac
3939
fi

0 commit comments

Comments
 (0)