Skip to content

Update Python dependencies and fix GitHub Actions workflow #45

Update Python dependencies and fix GitHub Actions workflow

Update Python dependencies and fix GitHub Actions workflow #45

Workflow file for this run

name: Testing MNE-Features on the latest Ubuntu
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
tests:
runs-on: ubuntu-latest
env:
CONDA_ENV: 'environment.yml'
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
numba: [ "on", "off" ]
continue-on-error: true
name: python-${{ matrix.python-version }}-numba-${{ matrix.numba }}
steps:
- uses: actions/checkout@v5
# Sometimes setup-miniconda shows CondaHTTPError.
# To mitigate, following config is added.
# Jobs may still fail with CondaHTTPError. In than case, re-run the failed jobs.
# Ref: https://github.com/conda-incubator/setup-miniconda/issues/129
- name: Prepare conda config before installation
run: |
cat <<EOF > .condarc
remote_max_retries: 10
remote_backoff_factor: 5
remote_connect_timeout_secs: 60
remote_read_timeout_secs: 120
EOF
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: 'mne-features'
python-version: ${{ matrix.python-version }}
environment-file: ${{ env.CONDA_ENV }}
condarc-file: .condarc
name: Install Miniconda and create environment
- if: ${{ matrix.numba == 'off' }}
shell: bash -el {0}
run: pip uninstall --yes --quiet numba
name: Uninstall numba
- shell: bash -el {0}
run: pip install --upgrade pytest pytest-cov flake8 check-manifest pytest-sugar
name: Install test utilities
- shell: bash -el {0}
run: python setup.py develop --no-deps
name: Install MNE-Features
- shell: bash -el {0}
run: |
flake8 --count mne_features
pytest --cov=mne_features --cov-report=xml --verbose mne_features/tests
name: Run tests (with coverage)
- shell: bash -el {0}
run: check-manifest --ignore doc,mne_features/*/tests
name: Check manifest
- name: Upload coverage stats
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml