diff --git a/.github/workflows/evaluations.yaml b/.github/workflows/evaluations.yaml index bc87c1c..f24f9b0 100644 --- a/.github/workflows/evaluations.yaml +++ b/.github/workflows/evaluations.yaml @@ -10,14 +10,14 @@ on: - 'master' # Also run on PRs with 'evals' label for testing pull_request: - types: [labeled, synchronize, reopened] + types: [labeled, synchronize, reopened, closed] jobs: evaluations: name: MCP tool calling evaluations runs-on: ubuntu-latest - # Run on master pushes or PRs with 'evals' label - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'validated') + # Run on master pushes, merged PRs, or PRs with 'validated' label + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || contains(github.event.pull_request.labels.*.name, 'validated') steps: - name: Checkout code @@ -39,7 +39,7 @@ jobs: - name: Run evaluations run: npm run evals:run env: - GITHUB_PR_NUMBER: ${{ github.event_name == 'pull_request' && github.event.number || 'master' }} + GITHUB_PR_NUMBER: ${{ github.event_name == 'pull_request' && github.event.number || (github.event_name == 'push' && 'master') || 'unknown' }} PHOENIX_API_KEY: ${{ secrets.PHOENIX_API_KEY }} PHOENIX_BASE_URL: ${{ secrets.PHOENIX_BASE_URL }} OPENROUTER_BASE_URL: ${{ secrets.OPENROUTER_BASE_URL }}