Skip to content

CI Fix (#240)

CI Fix (#240) #158

Workflow file for this run

name: Tests
on:
push:
branches: main
pull_request:
branches: main
jobs:
miniconda-setup:
name: Env
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.8
environment: "min-deps"
- python-version: 3.12
environment: "min-deps"
- python-version: 3.9
environment: "min-ver"
- python-version: 3.11
environment: "full"
- python-version: 3.12
environment: "torch-only"
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
channel-priority: true
activate-environment: test
environment-file: devtools/conda-envs/${{ matrix.environment }}-environment.yaml
- name: Environment Information
run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Check no NumPy for torch-only environment
if: matrix.environment == 'torch-only'
run: |
python devtools/ci_scripts/check_no_numpy.py
- name: Install
run: |
python -m pip install . --no-deps
- name: Test
run: |
pytest -v --cov=opt_einsum opt_einsum/ --cov-report=xml
- name: Coverage
run: |
coverage report
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml