-
Notifications
You must be signed in to change notification settings - Fork 104
45 lines (43 loc) · 1.14 KB
/
tests.yaml
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: Tests
on:
push:
branches:
- main
- v*-release
pull_request:
branches:
- main
jobs:
run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: 'true'
ref: ${{ github.event.pull_request.head.sha }} # we want to test against our branch not against a merge commit
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install lighteval in editable mode
run: |
pip install -e .[dev,extended_tasks,multilingual]
- name: Get cached files
uses: actions/cache@v2
id: get-cache
with:
path: "cache"
key: test-cache-HF
- name: Test
env:
HF_TEST_TOKEN: ${{ secrets.HF_TEST_TOKEN }}
run: | # PYTHONPATH="${PYTHONPATH}:src" HF_DATASETS_CACHE="cache/datasets" HF_HOME="cache/models"
python -m pytest --disable-pytest-warnings
- name: Write cache
uses: actions/cache@v2
with:
path: "cache"
key: test-cache-HF