Skip to content

Monoidal Streams

Monoidal Streams #998

Workflow file for this run

name: build
on:
push:
branches:
- 'main'
pull_request:
env:
SRC_DIR: discopy
TEST_DIR: test
DOCS_DIR: docs
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install linter
run:
python -m pip install pyproject-flake8 coverage pylint
- name: Check for errors
run:
# stop the build if there are Python syntax errors or undefined names
pflake8 discopy
- name: pylint
run:
pylint discopy
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install base package
run: |
pip install torch --index-url https://download.pytorch.org/whl/cpu # Install PyTorch without CUDA
pip install .[test]
- name: Install coverage and pytest
run:
pip install coverage pytest
- name: Test with pytest
run:
coverage run -m pytest
- name: Coverage report
run:
coverage report --fail-under=99 --show-missing
- name: Install nbmake and test notebooks
run: |
python -m pip install nbmake
pytest --nbmake ${{ env.DOCS_DIR }}/notebooks/*.ipynb