-
Notifications
You must be signed in to change notification settings - Fork 1.2k
64 lines (54 loc) · 1.7 KB
/
agent-evals.yaml
File metadata and controls
64 lines (54 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Agent Evals
on:
workflow_dispatch:
schedule:
# Run every 6 hours
- cron: "0 */6 * * *"
permissions:
contents: read
concurrency:
group: agent-evals-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- "20"
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: npm-shrinkwrap.json
- run: npm i -g npm@9.5
- run: npm install -g @google/gemini-cli
- run: npm ci
- run: npm install
working-directory: scripts/agent-evals
- name: "Run agent-evals tests"
run: |-
set -euo pipefail
# Create temporary directories and clean them up when we're done
TEMP_STDOUT="$(mktemp -p "${RUNNER_TEMP}" gemini-out.XXXXXXXXXX)"
TEMP_STDERR="$(mktemp -p "${RUNNER_TEMP}" gemini-err.XXXXXXXXXX)"
function cleanup {
rm -f "${TEMP_STDOUT}" "${TEMP_STDERR}"
}
trap cleanup EXIT
npm run test 2> "${TEMP_STDERR}" 1> "${TEMP_STDOUT}"
# Write the logs and errors to GITHUB_OUTPUT
mkdir -p gemini-artifacts
cp "${TEMP_STDOUT}" gemini-artifacts/stdout.log
cp "${TEMP_STDERR}" gemini-artifacts/stderr.log
cat "${TEMP_STDOUT}" >> "${GITHUB_OUTPUT}"
echo "EOF" >> "${GITHUB_OUTPUT}"
cat "${TEMP_STDERR}" >> "${GITHUB_OUTPUT}"
echo "EOF" >> "${GITHUB_OUTPUT}"
working-directory: scripts/agent-evals