diff --git a/.forgejo/workflows/dspy-eval.yml b/.forgejo/workflows/dspy-eval.yml index 1e415f64f3..3b037229dd 100644 --- a/.forgejo/workflows/dspy-eval.yml +++ b/.forgejo/workflows/dspy-eval.yml @@ -39,7 +39,6 @@ on: - cron: '0 2 * * *' env: - PYTHON_VERSION: '3.11' SERVER_IP: '91.98.224.44' SERVER_USER: 'root' @@ -50,18 +49,16 @@ jobs: unit-tests: name: Layer 1 - Unit Tests runs-on: ubuntu-latest - timeout-minutes: 5 + container: + image: python:3.11-slim + timeout-minutes: 10 steps: - uses: https://github.com/actions/checkout@v4 - - name: Set up Python - uses: https://github.com/actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Install dependencies run: | + pip install --upgrade pip pip install -e ".[dev]" pip install rapidfuzz @@ -84,6 +81,8 @@ jobs: dspy-module-tests: name: Layer 2 - DSPy Module Tests runs-on: ubuntu-latest + container: + image: python:3.11-slim timeout-minutes: 20 needs: unit-tests @@ -93,13 +92,9 @@ jobs: steps: - uses: https://github.com/actions/checkout@v4 - - name: Set up Python - uses: https://github.com/actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Install dependencies run: | + pip install --upgrade pip pip install -e ".[dev]" pip install dspy-ai httpx rapidfuzz litellm @@ -124,19 +119,22 @@ jobs: integration-tests: name: Layer 3 - Integration Tests runs-on: ubuntu-latest + container: + image: python:3.11-slim timeout-minutes: 15 needs: unit-tests steps: - uses: https://github.com/actions/checkout@v4 - - name: Set up Python - uses: https://github.com/actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install dependencies + - name: Install system dependencies run: | + apt-get update + apt-get install -y openssh-client curl + + - name: Install Python dependencies + run: | + pip install --upgrade pip pip install -e ".[dev]" pip install httpx pytest-asyncio @@ -188,6 +186,8 @@ jobs: comprehensive-eval: name: Layer 4 - Comprehensive Evaluation runs-on: ubuntu-latest + container: + image: python:3.11-slim timeout-minutes: 60 needs: [unit-tests, dspy-module-tests, integration-tests] @@ -197,13 +197,14 @@ jobs: steps: - uses: https://github.com/actions/checkout@v4 - - name: Set up Python - uses: https://github.com/actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - - - name: Install dependencies + - name: Install system dependencies run: | + apt-get update + apt-get install -y openssh-client curl + + - name: Install Python dependencies + run: | + pip install --upgrade pip pip install -e ".[dev]" pip install dspy-ai httpx rapidfuzz pandas pytest-json-report litellm