Scheduled Optimization Tests #25
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: Daily Optimization Tests | |
| on: | |
| schedule: | |
| # Run daily at 2 AM UTC | |
| - cron: "0 2 * * *" | |
| workflow_dispatch: # Allow manual triggering | |
| env: | |
| FORCE_COLOR: 1 | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }} | |
| TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | |
| GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/gcp_jwt_key.json | |
| jobs: | |
| optimization-tests: | |
| if: github.repository == 'tensorzero/tensorzero' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Write GCP JWT key to file | |
| env: | |
| GCP_JWT_KEY: ${{ secrets.GCP_JWT_KEY }} | |
| run: echo "$GCP_JWT_KEY" > $GITHUB_WORKSPACE/gcp_jwt_key.json | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 | |
| with: | |
| cache-provider: "buildjet" | |
| shared-key: "optimization-test-cache" | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@d12e869b89167df346dd0ff65da342d1fb1202fb | |
| with: | |
| tool: cargo-nextest | |
| - name: Run optimization tests | |
| run: cargo test-optimization --nocapture --no-fail-fast | |
| - name: Log test completion | |
| if: always() | |
| run: | | |
| echo "Optimization tests completed at $(date)" | |
| echo "Test result: ${{ job.status }}" |