Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create familly.yml #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/familly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tests familly project

on:
[pull_request]

defaults:
run:
# The slightly odd shell call is to force bash to read .bashrc, which is
# necessary for having conda behave sensibly.
shell: bash -l -e {0}

jobs:
tests:
name: ${{ matrix.repo }}-${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repo: [qutip-qip, qutip-jax, qutip-qoc]
version: [dev, release]

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.11

- name: Install QuTiP and dependencies
run: |
# Install the extra requirement
python -m pip install pytest pytest-rerunfailures # tests
python -m pip install numpy scipy cython filelock
python -m pip install -e . -v --no-build-isolation

- name: Install qutip-plugin
run: |
# jax cannot be installed from requirement (cpu vs gpu issue)
python -m pip install jax[cpu]
cd ..
git clone https://github.com/qutip/${{ matrix.repo }}.git
cd ${{ matrix.repo }}
if [[ $matrix.version == "release" ]]; then
# Checkout the latest tag as the latest release
git fetch --tags
git checkout $(git describe --tags "$(git rev-list --tags --max-count=1)")
fi
python -m pip install .
Ericgig marked this conversation as resolved.
Show resolved Hide resolved

- name: Print python environment
run: |
pip list

- name: Run test
run: |
cd ../${{ matrix.repo }}
pytest tests -vv

Loading