Skip to content

Commit

Permalink
[MAINT] Expand unit test workflow and add conda environment.yml (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbinns authored Sep 12, 2024
1 parent 2567afe commit 61f09d8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
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

0 comments on commit 61f09d8

Please sign in to comment.