-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (45 loc) · 1.38 KB
/
action.yml
File metadata and controls
45 lines (45 loc) · 1.38 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
name: 'Warwick AI Competitions'
description: 'GitHub Action used to manage Warwick AI competition leaderboards'
branding:
icon: 'award'
color: 'purple'
inputs:
project:
description: 'Name of the project which is being scored by the action (e.g. "wordle")'
required: true
python_version:
description: 'Python version'
required: false
default: '3.13'
outputs:
score:
description: 'Calculated competition score'
value: ${{ steps.score.outputs.score }}
success_rate:
description: 'Percentage of tests passed'
value: ${{ steps.score.outputs.success_rate }}
details:
description: 'JSON with detailed results'
value: ${{ steps.score.outputs.details }}
runs:
using: 'composite'
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: Install Dependencies
shell: bash
run: pip install -e .
- name: Score Project
id: score
shell: bash
run: |
python .github/submit.py
cat score.txt >> "$GITHUB_OUTPUT"
- name: Generate Summary
shell: bash
run: |
echo "## WAI Competition: ${{ inputs.project }}" >> $GITHUB_STEP_SUMMARY
echo "**Score:** ${{ steps.score.outputs.score }}" >> $GITHUB_STEP_SUMMARY
echo "**Tests:** ${{ steps.score.outputs.success_rate }}% passed" >> $GITHUB_STEP_SUMMARY