Add MNE Data Cache, Clean up and Document a bit
-name: Install And Run Tests of Braindecode
+name: Install Braindecode, Run Tests, Create Docs
on: [push]
jobs:
- Install-Test-Braindecode:
+ Install-Test-Doc-Braindecode:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- - name: Checking out repository
+
+ ## Install Braindecode
+ - name: Checking Out Repository
uses: actions/checkout@v2
- - name: Setting up conda braindecode environment
+ # Cache MNE Data
+ # The cache key here is fixed except for os
+ # so if you download a new mne dataset in the code, best to manually increment the key below
+ - name: Create/Restore MNE Data Cache
+ id: cache-mne_data
+ uses: actions/cache@v2
+ with:
+ path: ~/mne_data
+ key: ${{ runner.os }}-v1
+ - name: Setting Up Conda Braindecode Environment
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
python-version: 3.7
activate-environment: braindecode
auto-activate-base: false
- # Show Conda Versions and Braindecode Versions
+ # Show Conda and Python Versions
- run: conda --version
- run: conda info --envs
- run: which python
- - run: python -c "import braindecode; print(braindecode.__version__)"
# Install MOABB as well
- name: Install MOABB
run: pip install moabb
- - name: Install Braindecode from current checkout
+ - name: Install Braindecode from Current Checkout
run: pip install -e .
- - name: Install codecov etc.
+ # Show Braindecode Version
+ - run: python -c "import braindecode; print(braindecode.__version__)"
+
+ ## Run Tests
+ - name: Install Codecov etc.
run: pip install --upgrade pytest pytest-cov codecov
- name: Run Tests
run: pytest --cov=braindecode test/
- - name: Upload coverage to Codecov
+ - name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
file: ./junit-results.xml
- - name: Install docs requirements
+ - name: Install Docs Requirements
run: python -m pip install --upgrade -r docs/requirements.txt
- name: Install newer versions scikit learn scipy to prevent error # should be removed once moabb reason is clearer
run: pip install --upgrade scipy scikit-learn
