Skip to content

Commit 8238a46

Browse files
release: v0.10.0 (#177)
* bump version to v0.10.0 * ci: dynamic matrix split by test file, auto-retry, and integration-retest target - Add pytest-rerunfailures dev dependency (--reruns 2 --reruns-delay 10) - Split integration-tests into dynamic per-file matrix via collect job (auto-discovers test_*.py files, zero maintenance on test add/remove) - Deselect Vertex Anthropic and Google TTS tests pending access - Add `make integration-retest` for local rerun of last-failed tests * fix: require collect job success in build gate, re-enable test_stream_edit * security: pass matrix.test via env var to prevent script injection
1 parent 4d39d60 commit 8238a46

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,30 @@ jobs:
4141
uses: ./.github/workflows/ci.yml
4242
secrets: inherit
4343

44-
integration-tests:
44+
collect-integration-tests:
4545
needs: [validate-release, run-ci]
4646
runs-on: ubuntu-latest
47+
outputs:
48+
matrix: ${{ steps.collect.outputs.matrix }}
49+
steps:
50+
- uses: actions/checkout@v4
51+
- id: collect
52+
run: |
53+
echo "matrix=$(find tests/integration_tests -name 'test_*.py' -not -path '*/__pycache__/*' | sort | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT
54+
55+
integration-tests:
56+
needs: [validate-release, run-ci, collect-integration-tests]
57+
runs-on: ubuntu-latest
4758
timeout-minutes: 30
4859
environment:
4960
name: integration-tests
5061
permissions:
5162
contents: read
5263
id-token: write
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
test: ${{ fromJson(needs.collect-integration-tests.outputs.matrix) }}
5368
steps:
5469
- uses: actions/checkout@v4
5570
- id: auth
@@ -59,8 +74,9 @@ jobs:
5974
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
6075
- uses: ./.github/actions/setup-python-uv
6176
- run: uv sync --extra gcp
62-
- name: Run ${{ matrix.package }} integration tests
77+
- name: Run ${{ matrix.test }}
6378
env:
79+
TEST_FILE: ${{ matrix.test }}
6480
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
6581
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
6682
BFL_API_KEY: ${{ secrets.BFL_API_KEY }}
@@ -75,17 +91,21 @@ jobs:
7591
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
7692
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
7793
run: |
78-
uv run pytest tests/integration_tests -m integration -v --dist=worksteal -n auto \
79-
--ignore=tests/integration_tests/images/test_stream_edit.py \
94+
uv run pytest "$TEST_FILE" \
95+
-m integration -v \
96+
--reruns 2 --reruns-delay 10 \
97+
"--deselect=tests/integration_tests/text/test_generate.py::test_vertex_generate[anthropic-claude-haiku-4-5-us-east5]" \
98+
"--deselect=tests/integration_tests/text/test_stream_generate.py::test_vertex_stream_generate[anthropic-claude-haiku-4-5-us-east5]" \
8099
"--deselect=tests/integration_tests/audio/test_speak.py::test_speak[google-gemini-2.5-flash-tts]" \
81100
"--deselect=tests/integration_tests/audio/test_speak.py::test_speak[google-gemini-2.5-pro-tts]"
82101
83102
build:
84-
needs: [validate-release, run-ci, integration-tests]
103+
needs: [validate-release, run-ci, collect-integration-tests, integration-tests]
85104
if: |
86105
always() &&
87106
needs.validate-release.result == 'success' &&
88107
needs.run-ci.result == 'success' &&
108+
needs.collect-integration-tests.result == 'success' &&
89109
(needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped')
90110
runs-on: ubuntu-latest
91111
steps:

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help sync lint lint-fix format typecheck test integration-test security ci clean
1+
.PHONY: help sync lint lint-fix format typecheck test integration-test integration-retest security ci clean
22

33
# Default target
44
help:
@@ -8,8 +8,8 @@ help:
88
@echo " make format - Apply Ruff formatting"
99
@echo " make typecheck - Run mypy type checking"
1010
@echo " make test - Run all tests (core + packages) with coverage"
11-
@echo " make integration-test [capability] - Run integration tests (all or specific)"
12-
@echo " (e.g., make integration-test image-intelligence)"
11+
@echo " make integration-test - Run all integration tests"
12+
@echo " make integration-retest - Rerun only last-failed integration tests"
1313
@echo " make security - Run Bandit security scan"
1414
@echo " make ci - Run full CI/CD pipeline"
1515
@echo " make clean - Clean cache directories"
@@ -40,11 +40,15 @@ typecheck:
4040
test:
4141
uv run pytest tests/unit_tests --cov=celeste --cov-report=term-missing --cov-fail-under=80 -v
4242

43-
# Integration testing (requires API keys)
43+
# Integration testing (requires API keys and/or ADC credentials)
4444
# Runs tests from tests/integration_tests/
4545
integration-test:
4646
uv run pytest tests/integration_tests/ -m integration -v --dist=worksteal -n auto
4747

48+
# Rerun only last-failed integration tests (without xdist — --lf is incompatible with -n)
49+
integration-retest:
50+
uv run pytest tests/integration_tests/ -m integration -v --lf
51+
4852
# Catch capability names as no-op targets
4953
%:
5054
@:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "celeste-ai"
3-
version = "0.9.7"
3+
version = "0.10.0"
44
description = "Open source, type-safe primitives for multi-modal AI. All capabilities, all providers, one interface"
55
authors = [{name = "Kamilbenkirane", email = "kamil@withceleste.ai"}]
66
readme = "README.md"
@@ -48,6 +48,7 @@ dev = [
4848
"mypy>=1.13.0",
4949
"bandit[toml]>=1.7.5",
5050
"pre-commit>=3.5.0",
51+
"pytest-rerunfailures>=16.1",
5152
]
5253

5354
[build-system]

0 commit comments

Comments
 (0)