-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
39 lines (34 loc) · 1.22 KB
/
action.yml
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
name: SRComp Validate Action
description: A GitHub Action to validate a compstate.
runs:
using: composite
steps:
- name: Copy requirements locally
id: copy-requirements
shell: bash
run: |
# `cache-dependency-path` seems to need to be within the current directory. Use a temporary directory
#
tempdir=$(mktemp --directory --tmpdir=. --suffix=-srcomp-validate-action)
cp ${{ github.action_path }}/**requirements.txt $tempdir
echo "directory=${tempdir}" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: ${{ steps.copy-requirements.outputs.directory }}/**requirements.txt
- name: Install Dependencies
shell: bash
run: pip install -U -r ${{ steps.copy-requirements.outputs.directory }}/requirements.txt
- name: Run Scoring tests
shell: bash
run: |
python3 -m unittest discover --buffer scoring/
if [ -d scoring/tests/ ]
then
python3 -m unittest discover --buffer scoring/tests/
fi
- name: Run Compstate Validation
shell: bash
run: ${{ github.action_path }}/validate.py .