Support image tool outputs in chat completions #13
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: Unit 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 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-unit-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: | | |
| testmon-unit-${{ runner.os }}- | |
| - name: Run unit tests | |
| run: uv run pytest tests/unit/ --testmon | |
| - 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 }} |