diff --git a/tests/unit/scripts/github/ai-review-workflow.test.ts b/tests/unit/scripts/github/ai-review-workflow.test.ts index 8316e703..bc5280d7 100644 --- a/tests/unit/scripts/github/ai-review-workflow.test.ts +++ b/tests/unit/scripts/github/ai-review-workflow.test.ts @@ -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');