Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/tutorial-end-to-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ loop you will wire into CI next.**
> *shape* of the delta: tool/task metrics down, text-quality metrics
> flat.

Before wiring the workflow gate, switch `agentops.yaml` back to the
tool-using version (`support-bot:1` in the example above) if you want
the PR check to pass. Leave it on the degraded version only when you
intentionally want to demonstrate a red quality gate.

## 7. Generate the GitFlow workflows

```powershell
Expand Down
2 changes: 2 additions & 0 deletions src/agentops/templates/workflows/agentops-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
- name: Run AgentOps eval
env:
AZURE_AI_FOUNDRY_PROJECT_ENDPOINT: ${{ vars.AZURE_AI_FOUNDRY_PROJECT_ENDPOINT }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}
run: agentops eval run --config "${{ inputs.config || 'agentops.yaml' }}"

- name: Upload AgentOps results
Expand Down
2 changes: 2 additions & 0 deletions src/agentops/templates/workflows/agentops-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
- name: Run AgentOps eval (production gate)
env:
AZURE_AI_FOUNDRY_PROJECT_ENDPOINT: ${{ vars.AZURE_AI_FOUNDRY_PROJECT_ENDPOINT }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}
run: agentops eval run --config "${{ inputs.config || 'agentops.yaml' }}"

- name: Upload AgentOps results
Expand Down
2 changes: 2 additions & 0 deletions src/agentops/templates/workflows/agentops-deploy-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jobs:
- name: Run AgentOps eval
env:
AZURE_AI_FOUNDRY_PROJECT_ENDPOINT: ${{ vars.AZURE_AI_FOUNDRY_PROJECT_ENDPOINT }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}
run: agentops eval run --config "${{ inputs.config || 'agentops.yaml' }}"

- name: Upload AgentOps results
Expand Down
2 changes: 2 additions & 0 deletions src/agentops/templates/workflows/agentops-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
id: eval
env:
AZURE_AI_FOUNDRY_PROJECT_ENDPOINT: ${{ vars.AZURE_AI_FOUNDRY_PROJECT_ENDPOINT }}
AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}
run: |
set +e
agentops eval run --config "${{ inputs.config || 'agentops.yaml' }}"
Expand Down
15 changes: 15 additions & 0 deletions tests/unit/test_cicd.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ def test_all_templates_are_valid_yaml(tmp_path: Path) -> None:
assert "\non:" in text


def test_all_templates_pass_foundry_and_evaluator_environment(tmp_path: Path) -> None:
generate_cicd_workflows(directory=tmp_path)
expected_env = (
"AZURE_AI_FOUNDRY_PROJECT_ENDPOINT: "
"${{ vars.AZURE_AI_FOUNDRY_PROJECT_ENDPOINT }}",
"AZURE_OPENAI_ENDPOINT: ${{ vars.AZURE_OPENAI_ENDPOINT }}",
"AZURE_OPENAI_DEPLOYMENT: ${{ vars.AZURE_OPENAI_DEPLOYMENT }}",
)
for rel in ALL_PATHS:
content = (tmp_path / rel).read_text(encoding="utf-8")

for env_line in expected_env:
assert env_line in content


def test_pr_template_triggers_and_no_environment(tmp_path: Path) -> None:
generate_cicd_workflows(directory=tmp_path, kinds=["pr"])
content = (tmp_path / _PR_PATH).read_text(encoding="utf-8")
Expand Down
Loading