-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (76 loc) · 2.65 KB
/
agent-scenarios.yml
File metadata and controls
86 lines (76 loc) · 2.65 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
name: Agent Scenarios (E2E Proof)
on:
workflow_dispatch:
inputs:
provider:
description: "Provider to use for E2E runs"
required: true
default: "copilot"
type: choice
options:
- copilot
- openai
model:
description: "Model ID (must be available for the chosen provider)"
required: true
default: "gpt-5-mini"
type: string
permissions:
contents: read
jobs:
e2e:
name: E2E scenarios (${{ inputs.provider }})
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Fix Copilot binary permissions (Linux/Mac)
run: |
COPILOT_BIN=$(python -c "import copilot; import os; print(os.path.join(os.path.dirname(copilot.__file__), 'bin', 'copilot'))")
if [ -f "$COPILOT_BIN" ]; then
chmod +x "$COPILOT_BIN"
echo "✓ Made copilot binary executable: $COPILOT_BIN"
fi
- name: Validate required secrets
env:
PROVIDER: ${{ inputs.provider }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
run: |
if [ "$PROVIDER" = "copilot" ] && [ -z "$COPILOT_GITHUB_TOKEN" ]; then
echo "COPILOT_GITHUB_TOKEN secret is required for provider=copilot (unattended CI)" >&2
exit 1
fi
if [ "$PROVIDER" = "openai" ] && [ -z "$OPENAI_API_KEY" ]; then
echo "OPENAI_API_KEY secret is required for provider=openai" >&2
exit 1
fi
- name: Run E2E agent scenarios
env:
COPILOT_E2E_PROVIDER: ${{ inputs.provider }}
COPILOT_E2E_MODEL: ${{ inputs.model }}
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
# For provider=openai, add this secret in repo settings:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
run: |
mkdir -p artifacts
python scripts/run_agent_scenarios.py | tee artifacts/agent-scenarios.txt
- name: Upload transcript
if: always()
uses: actions/upload-artifact@v4
with:
name: agent-scenarios-transcript
path: |
artifacts/agent-scenarios.txt
if-no-files-found: ignore