Test workflow #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Test1 | |
run: python -c "assert 0 == 1" | |
- name: Test2 | |
if: always() | |
run: python -c "print('Hola')" | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip torch opt_einsum | |
- name: Install pytest | |
run: pip install pytest pytest-cov | |
- name: Test components | |
run: pytest tests/test_components.py --cov=tensorkrowch | |
- name: Test operations | |
if: always() | |
run: pytest tests/test_operations.py --cov=tensorkrowch | |
- name: Test embeddings | |
if: always() | |
run: pytest tests/test_embeddings.py --cov=tensorkrowch | |
- name: Test decompositions | |
if: always() | |
run: pytest tests/decompositions/ --cov=tensorkrowch | |
- name: Test MPS | |
if: always() | |
run: pytest tests/models/test_mps.py --cov=tensorkrowch | |
- name: Test MPO | |
if: always() | |
run: pytest tests/models/test_mpo.py --cov=tensorkrowch | |
- name: Test PEPS | |
if: always() | |
run: pytest tests/models/test_peps.py --cov=tensorkrowch | |
- name: Test Tree | |
if: always() | |
run: pytest tests/models/test_tree.py --cov=tensorkrowch |