-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (50 loc) · 1.71 KB
/
push.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
54
55
56
57
58
59
60
61
name: Test Python package
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
python: [3.8]
java: [13]
os: ['ubuntu-latest'] #
architecture: ['x64']
terrier: ['snapshot'] #'5.3', '5.4-SNAPSHOT',
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
distribution: 'zulu'
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python }}
conda-channels: anaconda, conda-forge
activate-conda: true
# follows https://medium.com/ai2-blog/python-caching-in-github-actions-e9452698e98d
- name: Loading Python & dependencies from cache
uses: actions/cache@v3
with:
path: /usr/share/miniconda/lib/python3.8/site-packages/
key: /usr/share/miniconda/lib/python3.8/site-packages/-${{ hashFiles('requirements.txt') }}
- name: Loading Torch models from cache
uses: actions/cache@v3
with:
path: /home/runner/.cache/
key: model-cache
- name: Install Python dependencies
run: |
conda install pip
pip install --upgrade --upgrade-strategy eager git+https://github.com/terrier-org/pyterrier.git#egg=python-terrier
pip install --upgrade --upgrade-strategy eager -r requirements.txt
pip install --upgrade --upgrade-strategy eager -r requirements-dev.txt
#install this software
pip install --timeout=120 .
- name: All unit tests
env:
TERRIER_VERSION: ${{ matrix.terrier }}
run: |
pytest -s