Skip to content

Update tests.yml

Update tests.yml #16

Workflow file for this run

name: tests

Check failure on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

`workflow-dispatch` is not a valid event name
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