-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
73 lines (67 loc) · 2.21 KB
/
action.yml
File metadata and controls
73 lines (67 loc) · 2.21 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
65
66
67
68
69
70
71
72
73
name: "EvalCI by SynapseKit"
description: "Run @eval_case suites on every PR and block merge if quality drops below threshold"
author: "SynapseKit"
branding:
icon: "check-circle"
color: "green"
inputs:
path:
description: "Path to eval files or directory"
default: "."
threshold:
description: "Global minimum score (0.0–1.0)"
default: "0.7"
extras:
description: "pip extras to install with synapsekit (e.g. openai,anthropic)"
default: "openai"
synapsekit-version:
description: "synapsekit version to install (e.g. 1.5.1 or latest)"
default: "latest"
github-token:
description: "GitHub token for posting PR comments"
default: ${{ github.token }}
fail-on-regression:
description: "Exit 1 if score regresses compared to baseline"
default: "false"
token:
description: "EvalCI backend API token (future use)"
default: ""
outputs:
passed:
description: "Number of eval cases that passed"
value: ${{ steps.evalci.outputs.passed }}
failed:
description: "Number of eval cases that failed"
value: ${{ steps.evalci.outputs.failed }}
total:
description: "Total number of eval cases"
value: ${{ steps.evalci.outputs.total }}
mean-score:
description: "Mean score across all eval cases"
value: ${{ steps.evalci.outputs.mean-score }}
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install synapsekit
shell: bash
run: |
if [ "${{ inputs.synapsekit-version }}" = "latest" ]; then
pip install --quiet --no-cache-dir --upgrade "synapsekit[${{ inputs.extras }}]"
else
pip install --quiet --no-cache-dir "synapsekit[${{ inputs.extras }}]==${{ inputs.synapsekit-version }}"
fi
- name: Run EvalCI
id: evalci
shell: bash
env:
INPUT_PATH: ${{ inputs.path }}
INPUT_THRESHOLD: ${{ inputs.threshold }}
INPUT_FAIL_ON_REGRESSION: ${{ inputs.fail-on-regression }}
INPUT_GITHUB_TOKEN: ${{ inputs.github-token }}
INPUT_TOKEN: ${{ inputs.token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
run: python ${{ github.action_path }}/entrypoint.py