diff --git a/.forgejo/workflows/dspy-eval.yml b/.forgejo/workflows/dspy-eval.yml index 31b7b69471..472acf2d77 100644 --- a/.forgejo/workflows/dspy-eval.yml +++ b/.forgejo/workflows/dspy-eval.yml @@ -49,22 +49,27 @@ jobs: unit-tests: name: Layer 1 - Unit Tests runs-on: ubuntu-latest - container: - image: python:3.11-slim + # Note: No container block - use default node:20-bookworm with Python installed via apt timeout-minutes: 10 steps: - uses: https://github.com/actions/checkout@v4 + - name: Install Python + run: | + apt-get update + apt-get install -y python3 python3-pip python3-venv + python3 --version + - name: Install dependencies run: | - pip install --upgrade pip - pip install -e ".[dev]" - pip install rapidfuzz + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[dev]" + python3 -m pip install rapidfuzz - name: Run Layer 1 unit tests run: | - pytest tests/dspy_gitops/test_layer1_unit.py \ + python3 -m pytest tests/dspy_gitops/test_layer1_unit.py \ -v --tb=short \ --junit-xml=layer1-results.xml @@ -81,8 +86,7 @@ jobs: dspy-module-tests: name: Layer 2 - DSPy Module Tests runs-on: ubuntu-latest - container: - image: python:3.11-slim + # Note: No container block - use default node:20-bookworm with Python installed via apt timeout-minutes: 20 needs: unit-tests @@ -92,17 +96,22 @@ jobs: steps: - uses: https://github.com/actions/checkout@v4 + - name: Install Python + run: | + apt-get update + apt-get install -y python3 python3-pip python3-venv + - name: Install dependencies run: | - pip install --upgrade pip - pip install -e ".[dev]" - pip install dspy-ai httpx rapidfuzz litellm + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[dev]" + python3 -m pip install dspy-ai httpx rapidfuzz litellm - name: Run Layer 2 DSPy tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} run: | - pytest tests/dspy_gitops/test_layer2_dspy.py \ + python3 -m pytest tests/dspy_gitops/test_layer2_dspy.py \ -v --tb=short \ --junit-xml=layer2-results.xml @@ -119,8 +128,7 @@ jobs: integration-tests: name: Layer 3 - Integration Tests runs-on: ubuntu-latest - container: - image: python:3.11-slim + # Note: No container block - use default node:20-bookworm with Python installed via apt timeout-minutes: 15 needs: unit-tests @@ -130,13 +138,13 @@ jobs: - name: Install system dependencies run: | apt-get update - apt-get install -y openssh-client curl + apt-get install -y openssh-client curl python3 python3-pip python3-venv - name: Install Python dependencies run: | - pip install --upgrade pip - pip install -e ".[dev]" - pip install httpx pytest-asyncio + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[dev]" + python3 -m pip install httpx pytest-asyncio - name: Setup SSH for tunnel run: | @@ -169,7 +177,7 @@ jobs: OXIGRAPH_ENDPOINT: "http://127.0.0.1:7878" ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} run: | - pytest tests/dspy_gitops/test_layer3_integration.py \ + python3 -m pytest tests/dspy_gitops/test_layer3_integration.py \ -v --tb=short \ --junit-xml=layer3-results.xml @@ -186,8 +194,7 @@ jobs: comprehensive-eval: name: Layer 4 - Comprehensive Evaluation runs-on: ubuntu-latest - container: - image: python:3.11-slim + # Note: No container block - use default node:20-bookworm with Python installed via apt timeout-minutes: 60 needs: [unit-tests, dspy-module-tests, integration-tests] @@ -200,13 +207,13 @@ jobs: - name: Install system dependencies run: | apt-get update - apt-get install -y openssh-client curl + apt-get install -y openssh-client curl python3 python3-pip python3-venv - name: Install Python dependencies run: | - pip install --upgrade pip - pip install -e ".[dev]" - pip install dspy-ai httpx rapidfuzz pandas pytest-json-report litellm + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[dev]" + python3 -m pip install dspy-ai httpx rapidfuzz pandas pytest-json-report litellm - name: Setup SSH for tunnel run: | @@ -228,7 +235,7 @@ jobs: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OXIGRAPH_ENDPOINT: "http://127.0.0.1:7878" run: | - pytest tests/dspy_gitops/test_layer4_comprehensive.py \ + python3 -m pytest tests/dspy_gitops/test_layer4_comprehensive.py \ -v --tb=short \ --junit-xml=layer4-results.xml \ --json-report \ @@ -236,7 +243,7 @@ jobs: - name: Generate metrics summary run: | - python -c " + python3 -c " import json from datetime import datetime diff --git a/tests/dspy_gitops/test_layer1_unit.py b/tests/dspy_gitops/test_layer1_unit.py index 5b4f23d7aa..43dbc56f90 100644 --- a/tests/dspy_gitops/test_layer1_unit.py +++ b/tests/dspy_gitops/test_layer1_unit.py @@ -343,4 +343,3 @@ class TestDatasetLoading: if __name__ == "__main__": pytest.main([__file__, "-v", "--tb=short"]) -# CI trigger Mon Jan 12 19:15:02 CET 2026