Merge pull request #3844 from dimagi/cs/fix_failing_test #567
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: Integration Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/**' | |
| - 'config/**' | |
| - 'uv.lock' | |
| # Manual trigger option | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: '3.13' | |
| permissions: | |
| contents: read | |
| jobs: | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres_password | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| redis: | |
| image: redis | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Install Python dependencies | |
| run: | | |
| uv venv | |
| uv sync --locked --dev | |
| - name: Run Integration Tests | |
| env: | |
| DJANGO_DATABASE_USER: postgres | |
| DJANGO_DATABASE_PASSWORD: postgres_password | |
| SECRET_KEY: secret-test-key | |
| PYTHONWARNINGS: default | |
| # Speech service credentials | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| AZURE_SPEECH_KEY: ${{ secrets.AZURE_SPEECH_KEY }} | |
| AZURE_SPEECH_REGION: ${{ secrets.AZURE_SPEECH_REGION }} | |
| # LLM provider credentials | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| GOOGLE_VERTEX_AI_CREDENTIALS_JSON: ${{ secrets.GOOGLE_VERTEX_AI_CREDENTIALS_JSON }} | |
| DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} | |
| AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
| AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} | |
| AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }} | |
| GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} | |
| PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }} | |
| run: uv run pytest -m integration -v -s --tb=short --junitxml=junit-integration.xml | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: integration-test-results | |
| path: junit-integration.xml | |
| retention-days: 30 |