Fix response ID security #102
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: GPU Test | |
| permissions: | |
| contents: read | |
| on: | |
| schedule: | |
| # Every day at 5 AM UTC+8 | |
| - cron: '0 21 * * *' | |
| workflow_dispatch: | |
| pull_request_target: | |
| types: [reopened, ready_for_review] | |
| jobs: | |
| label-check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should-run: ${{ steps.evaluate.outputs.should-run }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Decide whether to run | |
| id: evaluate | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const evaluateTrigger = require('./scripts/trigger_on_label.js'); | |
| evaluateTrigger({ core, context, labelName: 'ci-gpu' }); | |
| tests-full: | |
| needs: label-check | |
| if: needs.label-check.outputs.should-run == 'true' | |
| name: GPU Test with Python ${{ matrix.python-version }} (${{ matrix.setup-script }}) | |
| runs-on: [self-hosted, 1ES.Pool=agl-runner-gpu] | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: '3.10' | |
| setup-script: 'legacy' | |
| - python-version: '3.12' | |
| setup-script: 'stable' | |
| - python-version: '3.13' | |
| setup-script: 'latest' | |
| fail-fast: false | |
| steps: | |
| - name: Check GPU status | |
| run: nvidia-smi | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.number && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref }} | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade dependencies (latest) | |
| run: uv lock --upgrade | |
| if: matrix.setup-script == 'latest' | |
| - name: Sync dependencies (latest) | |
| run: uv sync --frozen --no-default-groups --extra apo --group dev --group agents --group torch-gpu-stable | |
| if: matrix.setup-script == 'latest' | |
| - name: Sync dependencies (stable & legacy) | |
| run: uv sync --frozen --no-default-groups --extra apo --group dev --group agents --group torch-gpu-${{ matrix.setup-script }} | |
| if: matrix.setup-script != 'latest' | |
| - name: Freeze dependencies | |
| run: | | |
| set -ex | |
| uv pip freeze | tee requirements-freeze.txt | |
| echo "UV_LOCKED=1" >> $GITHUB_ENV | |
| echo "UV_NO_SYNC=1" >> $GITHUB_ENV | |
| - name: Upload dependencies artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependencies-${{ matrix.python-version }}-${{ matrix.setup-script }} | |
| path: requirements-freeze.txt | |
| compression-level: 0 | |
| - name: Launch LiteLLM Proxy | |
| run: | | |
| ./scripts/litellm_run.sh | |
| env: | |
| AZURE_API_BASE: ${{ secrets.AZURE_GROUP_SUBSCRIPTION_API_BASE }} | |
| AZURE_API_KEY: ${{ secrets.AZURE_GROUP_SUBSCRIPTION_API_KEY }} | |
| - name: Run tests | |
| run: | | |
| uv run pytest -v --durations=0 tests | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| OPENAI_BASE_URL: http://localhost:12306/ | |
| OPENAI_API_KEY: dummy |