@@ -8,8 +8,9 @@ branding:
88
99inputs :
1010 language :
11- description : " SDK language to test. One of: js, python"
12- required : true
11+ description : " SDK language to test. One of: js, py, or leave empty for both"
12+ required : false
13+ default : " "
1314 openai-api-key :
1415 description : " OpenAI API key"
1516 required : true
3435 node-version : " 20"
3536
3637 - name : Setup Python
38+ if : inputs.language == 'py' || inputs.language == ''
3739 uses : actions/setup-python@v5
3840 with :
3941 python-version : " 3.13"
4648 - name : Setup SDK dependencies
4749 shell : bash
4850 working-directory : ${{ github.action_path }}
49- run : npm run cli setup
51+ run : |
52+ if [ -z "${{ inputs.language }}" ]; then
53+ npm run cli setup
54+ else
55+ npm run cli setup ${{ inputs.language }}
56+ fi
5057
5158 - name : Run tests
5259 id : run-tests
5865 GOOGLE_API_KEY : ${{ inputs.google-api-key }}
5966 run : |
6067 set +e
61- npm run cli run ${{ inputs.language }} --reports ctrf
68+ if [ -z "${{ inputs.language }}" ]; then
69+ npm run cli run -- --all --reports ctrf
70+ else
71+ npm run cli run ${{ inputs.language }} -- --reports ctrf
72+ fi
6273 EXIT_CODE=$?
6374 set -e
6475
7788 script : |
7889 const fs = require('fs');
7990 const path = require('path');
80- const language = '${{ inputs.language }}';
91+ const language = '${{ inputs.language }}' || 'all';
92+ const languageDisplay = language === 'all' ? 'js & py' : language;
8193 const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
8294
8395 // Try to read test results from CTRF report
98110
99111 const body = `## AI Integration Test Failure
100112
101- **Language**: ${language }
113+ **Language**: ${languageDisplay }
102114 **Date**: ${new Date().toISOString()}
103115 **Workflow Run**: ${runUrl}
104116
@@ -130,7 +142,7 @@ runs:
130142 const newIssue = await github.rest.issues.create({
131143 owner: context.repo.owner,
132144 repo: context.repo.repo,
133- title: `AI Integration Tests Failed (${language }) - ${today}`,
145+ title: `AI Integration Tests Failed (${languageDisplay }) - ${today}`,
134146 body: body,
135147 labels: [issueLabel, 'automated']
136148 });
0 commit comments