Add files #5
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 Test | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| # Get environment variables. | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.7.8" | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install system dependencies for rendering | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb libegl1 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Restore testmon cache | |
| id: cache-testmon-restore | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| .testmondata | |
| .testmondata-shm | |
| .testmondata-wal | |
| key: testmon-integration-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: | | |
| testmon-integration-${{ runner.os }}- | |
| - name: Run integration tests | |
| timeout-minutes: 30 | |
| run: uv run pytest tests/integration/ --testmon -x | |
| - name: Save testmon cache | |
| uses: actions/cache/save@v4 | |
| if: >- | |
| (success() || failure()) && | |
| steps.cache-testmon-restore.outputs.cache-hit != 'true' | |
| with: | |
| path: | | |
| .testmondata | |
| .testmondata-shm | |
| .testmondata-wal | |
| key: ${{ steps.cache-testmon-restore.outputs.cache-primary-key }} |