forked from NSPG13/agent-bounties
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (81 loc) · 3.38 KB
/
Copy pathproduction-smoke.yml
File metadata and controls
91 lines (81 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Production Smoke
on:
workflow_dispatch:
inputs:
api_base_url:
description: "Deployed API base URL, for example https://api.agentbounties.app"
required: false
type: string
mcp_base_url:
description: "Deployed MCP base URL, for example https://mcp.agentbounties.app"
required: false
type: string
expected_revision:
description: "Exact deployed Git revision; defaults to the checked-out main revision"
required: false
type: string
require_eval_history:
description: "Require persisted eval-run history on the deployed API"
required: false
type: boolean
default: false
schedule:
- cron: "43 * * * *"
permissions:
contents: read
concurrency:
group: production-smoke-${{ github.ref }}
cancel-in-progress: true
jobs:
deployment-paused:
if: github.event_name != 'workflow_dispatch' && vars.RENDER_DEPLOY_PAUSE_REASON != ''
runs-on: ubuntu-latest
steps:
- name: Report declared deployment pause
run: echo "Production smoke paused - ${{ vars.RENDER_DEPLOY_PAUSE_REASON }}" >> "$GITHUB_STEP_SUMMARY"
production-smoke:
if: github.event_name == 'workflow_dispatch' || vars.RENDER_DEPLOY_PAUSE_REASON == ''
runs-on: ubuntu-latest
timeout-minutes: 10
env:
PRODUCTION_API_BASE_URL: ${{ inputs.api_base_url || vars.PRODUCTION_API_BASE_URL || 'https://api.agentbounties.app' }}
PRODUCTION_MCP_BASE_URL: ${{ inputs.mcp_base_url || vars.PRODUCTION_MCP_BASE_URL || 'https://mcp.agentbounties.app' }}
PRODUCTION_EXPECTED_REVISION: ${{ inputs.expected_revision || github.sha }}
REQUIRE_EVAL_HISTORY_INPUT: ${{ inputs.require_eval_history || 'false' }}
REQUIRE_EVAL_HISTORY_VAR: ${{ vars.PRODUCTION_SMOKE_REQUIRE_EVAL_HISTORY || 'false' }}
steps:
- uses: actions/checkout@v4
- name: Resolve production smoke configuration
id: config
shell: bash
run: |
require_eval_history="false"
if [[ "${REQUIRE_EVAL_HISTORY_INPUT,,}" == "true" || "${REQUIRE_EVAL_HISTORY_VAR,,}" == "true" ]]; then
require_eval_history="true"
fi
echo "require_eval_history=${require_eval_history}" >> "$GITHUB_OUTPUT"
{
echo "## Production Smoke"
echo
echo "- API: ${PRODUCTION_API_BASE_URL}"
echo "- MCP: ${PRODUCTION_MCP_BASE_URL}"
echo "- Expected revision: ${PRODUCTION_EXPECTED_REVISION}"
echo "- Require eval history: ${require_eval_history}"
echo
echo "This workflow cannot silently skip. It verifies the exact deployed revision and is read-only."
echo "It runs after deployment by schedule or manual dispatch, not as a pre-deploy branch check."
} >> "$GITHUB_STEP_SUMMARY"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run read-only hosted production smoke
shell: bash
run: |
args=(
--api-base-url "${PRODUCTION_API_BASE_URL}"
--mcp-base-url "${PRODUCTION_MCP_BASE_URL}"
--expected-revision "${PRODUCTION_EXPECTED_REVISION}"
)
if [[ "${{ steps.config.outputs.require_eval_history }}" == "true" ]]; then
args+=(--require-eval-history)
fi
bash scripts/check-production-smoke.sh "${args[@]}"