deps(deps): update openai requirement from >=1.0.0 to >=2.37.0 #95
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Testing Matrix | |
| test: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| exclude: | |
| # Reduce matrix size for faster CI | |
| - os: windows-latest | |
| python-version: "3.9" | |
| - os: macos-latest | |
| python-version: "3.9" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements-test.txt | |
| - name: Install package in editable mode | |
| run: | | |
| pip install -e . || echo "Editable install failed, will use PYTHONPATH" | |
| - name: Run tests with coverage | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| PYTHONPATH: ${{ github.workspace }}/src | |
| run: | | |
| pytest --cov=promptix --cov-report=xml --cov-report=term-missing -v | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| # Performance Testing | |
| performance: | |
| name: Performance Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run performance tests | |
| run: | | |
| pytest tests/test_performance.py -v --tb=short | |
| continue-on-error: true | |
| # Integration Tests | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run integration tests | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| PYTHONPATH: ${{ github.workspace }}/src | |
| run: | | |
| pytest -m integration -v --tb=short | |
| continue-on-error: true | |
| # Final Status Check | |
| ci-success: | |
| name: CI Success | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: always() | |
| steps: | |
| - name: Check all jobs status | |
| run: | | |
| if [[ "${{ needs.quality.result }}" == "failure" || "${{ needs.test.result }}" == "failure" ]]; then | |
| echo "CI failed due to quality or test failures" | |
| exit 1 | |
| elif [[ "${{ needs.docs.result }}" == "failure" ]]; then | |
| echo "CI completed but documentation build failed" | |
| exit 0 | |
| else | |
| echo "CI passed successfully" | |
| exit 0 | |
| fi |