test(ci): update ai-review workflow runtime assertions

This commit is contained in:
Tam Nhu Tran
2026-04-13 11:38:09 -04:00
parent 026ff6cedd
commit 72d8f36b5d
@@ -8,16 +8,21 @@ function loadWorkflow() {
}
describe('ai-review workflow', () => {
test('uses the claude-code-action reviewer path with glm-5.1 and PR-sha comment markers', () => {
test('uses the claude-code-action reviewer path with configurable review runtime and PR-sha comment markers', () => {
const workflow = loadWorkflow();
expect(workflow).toContain('timeout-minutes: 20');
expect(workflow).toContain('REVIEW_MODEL: glm-5.1');
expect(workflow).toContain('ANTHROPIC_MODEL: glm-5.1');
expect(workflow).toContain('ANTHROPIC_DEFAULT_OPUS_MODEL: glm-5.1');
expect(workflow).toContain('ANTHROPIC_DEFAULT_SONNET_MODEL: glm-5.1');
expect(workflow).toContain('ANTHROPIC_DEFAULT_HAIKU_MODEL: glm-5.1');
expect(workflow).toContain('Variables: AI_REVIEW_BASE_URL, AI_REVIEW_MODEL');
expect(workflow).toContain('Secrets: AI_REVIEW_API_KEY');
expect(workflow).toContain('ANTHROPIC_BASE_URL: ${{ vars.AI_REVIEW_BASE_URL }}');
expect(workflow).toContain('REVIEW_MODEL: ${{ vars.AI_REVIEW_MODEL }}');
expect(workflow).toContain('ANTHROPIC_AUTH_TOKEN: ${{ secrets.AI_REVIEW_API_KEY }}');
expect(workflow).toContain('ANTHROPIC_MODEL: ${{ vars.AI_REVIEW_MODEL }}');
expect(workflow).toContain('ANTHROPIC_DEFAULT_OPUS_MODEL: ${{ vars.AI_REVIEW_MODEL }}');
expect(workflow).toContain('ANTHROPIC_DEFAULT_SONNET_MODEL: ${{ vars.AI_REVIEW_MODEL }}');
expect(workflow).toContain('ANTHROPIC_DEFAULT_HAIKU_MODEL: ${{ vars.AI_REVIEW_MODEL }}');
expect(workflow).toContain('uses: anthropics/claude-code-action@v1');
expect(workflow).toContain('anthropic_api_key: ${{ secrets.AI_REVIEW_API_KEY }}');
expect(workflow).toContain('--model ${{ env.REVIEW_MODEL }}');
expect(workflow).toContain('--max-turns 45');
expect(workflow).toContain('--json-schema');