-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (46 loc) · 1.26 KB
/
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
name: tests
on:
push:
branches: [main]
pull_request:
# Check all PR
workflow_dispatch:
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-20.04']
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install GElib dependencies
run: |
python -m pip install --upgrade pip
# to build cnine and GElib
pip install wheel
# torch cpu version
pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
# cnine
## needs to be installed in environment mode
## in same directory level as GElib
cd ..
git clone https://github.com/risi-kondor/cnine.git
cd cnine/python
pip install --no-build-isolation -e .
cd ../../GElib
# GElib
cd python
pip install --no-build-isolation -e .
cd ..
- name: Install test dependencies
run: |
pip install numpy scipy pytest
- name: Run tests
run: |
pytest python/tests/ci_tests
pytest --doctest-modules --pyargs gelib