-
Notifications
You must be signed in to change notification settings - Fork 101
53 lines (44 loc) · 1.55 KB
/
run-tests.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9' # Specify your required Python version
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt # Assumes you have a requirements.txt file
- name: Cache test assets
uses: actions/cache@v2
with:
path: tests/demonstrations
key: assets-${{ github.sha }}
restore-keys: |
assets-
- name: Download test demos from release URL into `tests/demonstrations`
run: |
mkdir -p tests/demonstrations
curl -L -o tests/demonstrations/aaabtsd.zip https://github.com/McGill-NLP/weblinx/releases/download/tests-assets/aaabtsd.zip
unzip -u tests/demonstrations/aaabtsd.zip -d tests/demonstrations
curl -L -o tests/demonstrations/aajfwoq.zip https://github.com/McGill-NLP/weblinx/releases/download/tests-assets/aajfwoq.zip
unzip -u tests/demonstrations/aajfwoq.zip -d tests/demonstrations
- name: Run tests
run: |
python -m unittest discover -s tests