Skip to content

Commit a90669a

Browse files
committed
test: address PR feedback for evals and nightly workflow
- Add missing expectation for foundKeywords in pr-review.eval.ts - Improve formatting of timeout error logs in test-rig.ts - Add comments explaining retry logic for npm installations - Remove || true from evaluation script in GitHub Action
1 parent 6d5fd3d commit a90669a

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/evals-nightly.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ jobs:
4747
cache: 'npm'
4848

4949
- name: 'Install dependencies'
50+
# Retry logic for transient network or package retrieval failures
5051
run: |
5152
npm ci || (sleep 10 && npm ci) || (sleep 30 && npm ci)
5253
5354
- name: 'Install Gemini CLI'
55+
# Retry logic for transient network or package retrieval failures
5456
run: |
5557
npm install -g @google/gemini-cli@latest || (sleep 10 && npm install -g @google/gemini-cli@latest) || (sleep 30 && npm install -g @google/gemini-cli@latest)
5658
@@ -62,7 +64,7 @@ jobs:
6264
GEMINI_MODEL: '${{ matrix.model }}'
6365
run: |
6466
BASE_NAME=$(basename "${{ matrix.eval-file }}" .eval.ts)
65-
npm run test:evals -- "${{ matrix.eval-file }}" --reporter=json --outputFile="eval-results-${{ matrix.model }}-${BASE_NAME}.json" || true
67+
npm run test:evals -- "${{ matrix.eval-file }}" --reporter=json --outputFile="eval-results-${{ matrix.model }}-${BASE_NAME}.json"
6668
6769
- name: 'Upload Results'
6870
if: 'always()'
@@ -86,6 +88,7 @@ jobs:
8688
cache: 'npm'
8789

8890
- name: 'Install dependencies'
91+
# Retry logic for transient network or package retrieval failures
8992
run: |
9093
npm ci || (sleep 10 && npm ci) || (sleep 30 && npm ci)
9194

evals/pr-review.eval.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ describe('PR Review Workflow', () => {
8181
}
8282

8383
expect(stdout.length).toBeGreaterThan(0);
84+
expect(foundKeywords.length).toBeGreaterThan(0);
8485
} finally {
8586
rig.cleanup();
8687
}

evals/test-rig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class TestRig {
168168
child.kill('SIGKILL');
169169
reject(
170170
new Error(
171-
`Timeout: Command exceeded 600 seconds. stdout: ${stdout.substring(0, 500)} stderr: ${stderr.substring(0, 500)}`,
171+
`Timeout: Command exceeded 600 seconds. stdout:\n${stdout.slice(-500)}\nstderr: \n${stderr.slice(-500)}\n`,
172172
),
173173
);
174174
}, 600_000);

0 commit comments

Comments
 (0)