Skip to content

MAINT: Update CIs

MAINT: Update CIs #8

Workflow file for this run

name: 'Tests'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
push:
branches: ["master", "maint/*"]
pull_request:
branches: ["master", "maint/*"]
permissions:
contents: read
jobs:
pytest:
name: '${{ matrix.os }} / ${{ matrix.python }}'
timeout-minutes: 70
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
env:
MNE_HCP_N_RUNS: '3'
SUBJECTS_DIR: '${{ github.workspace }}/subjects'
MNE_LOGGING_LEVEL: warning
strategy:
matrix:
include:
- os: ubuntu-latest
python: '3.8' # TODO: Bump to 3.12
# - os: macos-latest # arm64 (Apple Silicon)
# python: '3.12'
# kind: mamba
# - os: macos-13 # latest Intel release
# python: '3.12'
# kind: mamba
# - os: windows-latest
# python: '3.12'
# - os: ubuntu-20.04
# python: '3.8'
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install --upgrade pip setuptools
# TODO: shouldn't need to install NumPy first or pin it (distutils gone in 2.0), bad build reqs
- run: pip install --upgrade "numpy<2" s3cmd mne scikit-learn nose pytest pytest-cov "mne<0.24" nibabel
# TODO: Relax this pin
# TODO: Remove nose dependency
- run: pip install --no-build-isolation -ve .
- run: openssl aes-256-cbc -K "${{ secrets.encrypted_73bd2a498087_key }}" -iv "${{ secrets.encrypted_73bd2a498087_iv }}" -in .s3cfg.enc -out ~/.s3cfg -d
- run: python -c "from pathlib import Path; assert (Path('~').expanduser() / '.s3cfg').is_file()"
- run: mkdir ~/mne-hcp-data
- run: s3cmd get s3://mne-hcp-testing-data/mne-hcp-testing.tar.gz ~/mne-hcp-data/
- run: cd ~/mne-hcp-data/ && tar -xvzf mne-hcp-testing.tar.gz
- run: find ~/mne-hcp-data/mne-hcp-testing/105923 -name "*" > output.txt && cat output.txt | wc -l && head output.txt
- run: mkdir -p "${{ env.SUBJECTS_DIR}}" && python -c "import mne; mne.datasets.fetch_fsaverage(subjects_dir='${{ env.SUBJECTS_DIR }}')"
# TODO: Move this to the top (toward bottom to speed up testing of steps above)
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- run: pytest -rfEXs --cov-report= --tb=short --durations 30 -v --cov=hcp --cov-report xml hcp
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()