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

[MAINT] Test conda #2

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
35 changes: 33 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
# Run unit tests
test:
test_pip:
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -58,4 +58,35 @@ jobs:
which python
- run: pip install -e .
- run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()"
- run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m
- name: Run pytest
run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m

test_conda:
timeout-minutes: 90
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
env:
MKL_NUM_THREADS: '1'
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.12'
steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=${{ env.PYTHON_VERSION }}
- name: Install package and test dependencies
run: |
pip install -e .
pip install .[test]
- name: Display versions and environment information
run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()"
- name: Run pytest
run: python -m coverage run --source=pybispectra -m pytest -v tests && coverage report -m
11 changes: 11 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: pybispectra
channels:
- conda-forge
dependencies:
- python>=3.10
- joblib
- matplotlib
- mne>1.6
- numba
- numpy
- scipy