Build and run notebook regression #53
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build and run notebook regression | |
on: | |
push: | |
branches: [ "beta", "master" ] | |
# Allow running manually from Actions tab | |
workflow_dispatch: | |
env: | |
SKIP_DEAP: 1 | |
jobs: | |
notebook_regression: # On stable branches, run extended tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # Finish all tests even if one fails | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
python-version: [3.7, 3.8, 3.9, '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up installation environment (Ubuntu or Windows) | |
if: ${{matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019'}} | |
run: | | |
./.github/ci-scripts/before_install.sh | |
#download chp source code | |
curl -o ./jupyter_notebooks/Tutorials/algorithms/advanced/chp.c https://www.scottaaronson.com/chp/chp.c | |
#compile chp | |
gcc -o ./jupyter_notebooks/Tutorials/algorithms/advanced/chp ./jupyter_notebooks/Tutorials/algorithms/advanced/chp.c | |
- name: Set up installation environment (MacOS) | |
if: ${{matrix.os == 'macos-11'}} | |
run: | | |
./.github/ci-scripts/before_install_macos.sh | |
#download chp source code | |
curl -o ./jupyter_notebooks/Tutorials/algorithms/advanced/chp.c https://www.scottaaronson.com/chp/chp.c | |
#compile chp source code | |
gcc -o ./jupyter_notebooks/Tutorials/algorithms/advanced/chp ./jupyter_notebooks/Tutorials/algorithms/advanced/chp.c | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('**/*requirements.txt') }} | |
- name: Install package | |
run: | | |
python -m pip install --upgrade pip | |
# Installing with -e to keep installation local | |
# but still compile Cython extensions | |
python -m pip install -e .[testing] | |
python setup.py build_ext --inplace | |
- name: Run notebook regression ubuntu | |
if: ${{matrix.os == 'ubuntu-20.04'}} | |
run: | | |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)" | |
python -m pytest -n auto --nbval-lax --dist loadscope --nbval-current-env jupyter_notebooks | |
- name: Run notebook regression windows | |
if: ${{matrix.os == 'windows-2019'}} | |
run: | | |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)" | |
python -m pytest -n auto --nbval-lax --dist loadscope --nbval-current-env jupyter_notebooks | |
- name: Run notebook regression MacOS | |
if: ${{matrix.os == 'macos-11'}} | |
run: | | |
python -Ic "import pygsti; print(pygsti.__version__); print(pygsti.__path__)" | |
python -m pytest -n auto --nbval-lax --dist loadscope --nbval-current-env jupyter_notebooks | |