handle pagination - needed for Stieger2021 ds #1988
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test-devel | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
test: | |
name: dev ${{ matrix.os }}, py-${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
python-version: [ "3.9", "3.10" ] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create local data folder | |
if: runner.os != 'Windows' | |
run: | | |
mkdir ~/mne_data | |
- name: Create/Restore MNE Data Cache | |
if: runner.os != 'Windows' | |
id: cache-mne_data | |
uses: actions/cache@v3 | |
with: | |
path: ~/mne_data | |
key: ${{ runner.os }}-mne_data | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
if: runner.os != 'Windows' | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: | |
testvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{ | |
hashFiles('**/pyproject.toml') }} | |
- name: Install dependencies | |
if: | | |
(runner.os != 'Windows') && | |
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true') | |
run: poetry install --no-interaction --no-root --extras deeplearning --extras optuna | |
- name: Install library (Linux/OSX) | |
if: ${{ runner.os != 'Windows' }} | |
run: poetry install --no-interaction --extras deeplearning --extras optuna | |
- name: Install library (Windows) | |
if: ${{ runner.os == 'Windows' }} | |
run: poetry install --no-interaction --extras optuna | |
- name: Run tests | |
run: | | |
source $VENV | |
poetry run coverage run -m pytest moabb/tests | |
poetry run coverage xml | |
- name: Run pipelines | |
run: | | |
source $VENV | |
poetry run python -m moabb.run --pipelines=./moabb/tests/test_pipelines/ --verbose | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
if: success() | |
with: | |
verbose: true | |
directory: /home/runner/work/moabb/moabb | |
files: ./.coverage,coverage.xml | |
env_vars: OS,PYTHON |