-
Notifications
You must be signed in to change notification settings - Fork 12
57 lines (51 loc) · 1.43 KB
/
test.yml
File metadata and controls
57 lines (51 loc) · 1.43 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
name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [created, published, edited]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
# If one benchmark fails, continue running the others
fail-fast: false
matrix:
benchmark:
- example_bench
- toposense_bench
- courselab_bench
- courseexam_bench
# TODO: For now, we comment out other benchmarks as they have no tests
# - arteval_bench
# - cache_bench
# - course_project_bench
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
working-directory: benchmarks/${{ matrix.benchmark }}
run: |
python -m venv env${{ matrix.benchmark }}
source env${{ matrix.benchmark }}/bin/activate
pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
if [ -f pyproject.toml ]; then
pip install -e ".[dev]"
fi
deactivate
- name: Run tests
run: |
source benchmarks/${{ matrix.benchmark }}/env${{ matrix.benchmark }}/bin/activate
pytest benchmarks/${{ matrix.benchmark }}/tests -v
deactivate