Revision c37a55579df7095a5ee66a62a5b99281bdf01418 authored by TUNA Caglayan on 01 September 2021, 09:32:34 UTC, committed by TUNA Caglayan on 01 September 2021, 09:32:34 UTC
1 parent 4772692
test.yml
name: Test TensorLy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BACKEND: ['numpy', 'pytorch', 'tensorflow', 'jax', 'mxnet']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies and backend ${{matrix.BACKEND}}
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r doc/requirements_doc.txt
echo "Installing dependencies for BACKEND=${{matrix.BACKEND}}"
if [[ "${{matrix.BACKEND}}" == "numpy" ]]; then
echo "Installing sparse";
pip install sparse;
elif [[ "${{matrix.BACKEND}}" == "pytorch" ]]; then
echo "Installing PyTorch";
pip install torch torchvision;
elif [[ "${{matrix.BACKEND}}" == "tensorflow" ]]; then
echo "Installing TensorFlow";
pip install tensorflow;
elif [[ "${{matrix.BACKEND}}" == "mxnet" ]]; then
echo "Installing MXNet";
pip install mxnet;
elif [[ "${{matrix.BACKEND}}" == "jax" ]]; then
echo "Installing JAX";
pip install jax jaxlib;
fi
- name: Install package
run: |
python -m pip install -e .
- name: Test with backend ${{matrix.BACKEND}} pytest and coverage
run: |
TENSORLY_BACKEND=${{matrix.BACKEND}} pytest -vv --cov tensorly --cov-report xml tensorly
- name: Check coverage with CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
verbose: true

Computing file changes ...