Skip to content

Update workflow

Update workflow #252

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
backend: ['numpy', 'pytorch']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install cython==0.29.36
python -m pip install torch==1.13.1
python -m pip install numba==0.58.1
python -m pip install numpy==1.24.2
python -m pip install condat_tv
python -m pip install -e .[gpl,devel,data]
- name: run all tests
if: ${{ matrix.backend == 'numpy' }}
run: |
python3 -m pytest --cov=matcouply --cov-report=xml
env:
TENSORLY_BACKEND: ${{ matrix.backend }}
- name: run tests (no doctests)
if: ${{ matrix.backend != 'numpy' }}
run: |
RAISE_NO_TV=1 python3 -m pytest tests
env:
TENSORLY_BACKEND: ${{ matrix.backend }}
- name: upload coverage to Codecov
if: ${{ matrix.backend == 'numpy' && matrix.os == 'ubuntu-latest'}}
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
verbose: true # optional (default = false)