Skip to content

Commit

Permalink
fighting with GH actions (#430)
Browse files Browse the repository at this point in the history
* cleanup

* test

* fix conda env path

* Fix name

* Try to properly activate conda env

* Fetch MNE from git repo to include test files

* Skip unnecessary uninstall step

* test

* dont use conda on gh actions

* iter

* iter

* iter

* iter

* fix

* iter

* fix

* fix?

* revert

* update readme

* cleanup

* test validator master

* fix?

* fix?

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* try windows

* debug

* debug

* debug

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* cleanup

* cleanup

* cleanup

* cleanup

* rm travis and appveyor

* simplify

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
  • Loading branch information
agramfort and hoechenberger committed May 24, 2020
1 parent 3221379 commit c246eee
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 201 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifact-path: 0/dev/index.html
circleci-jobs: docs-build

62 changes: 46 additions & 16 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MNE-BIDS
name: build

on:
push:
Expand All @@ -13,9 +13,10 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: [3.5, 3.6, 3.7, 3.8]
os: [ubuntu-18.04, ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8]

env:
TZ: Europe/Berlin
Expand All @@ -25,31 +26,60 @@ jobs:
uses: actions/setup-node@v1.4.2
with:
node-version: 12
- name: Set up Python environment${{ matrix.python-version }}
uses: goanpeca/setup-miniconda@v1.4.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
environment-file: mne-bids/environment.yml
activate-environment: mne_bids
auto-update-conda: true
channel-priority: strict
channels: conda-forge, defaults
- name: Install BIDS validator
run: npm install -g bids-validator
python-version: ${{ matrix.python-version }}
- name: Install dependencies using pip
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install MNE (stable)
if: "matrix.os != 'ubuntu-latest'"
run: |
git clone --depth 1 https://github.com/mne-tools/mne-python.git -b maint/0.20
pip install --no-deps -e ./mne-python
- name: Install MNE (master)
if: "matrix.os == 'ubuntu-latest'"
run: |
git clone --depth 1 https://github.com/mne-tools/mne-python.git -b master
pip install --no-deps -e ./mne-python
- name: Install BIDS validator (stable)
if: "matrix.os != 'ubuntu-latest'"
run: |
npm install -g bids-validator
- name: Install BIDS validator (master)
if: "matrix.os == 'ubuntu-latest'"
run: |
cd ..
git clone --depth 1 https://github.com/bids-standard/bids-validator
cd bids-validator
git checkout master
yarn
echo "::add-path::$(pwd)/bids-validator/bin"
cd ../mne-bids
- name: Display versions and environment information
run: |
echo $TZ
date
npm --version
node --version
echo "npm"; npm --version
echo "node"; node --version
echo "bids-validator"; bids-validator --version
python --version
which python
mne sys_info
bids-validator --version
- name: Install MNE-BIDS
run: pip install --no-deps .
- name: Run pytest
run: pytest . --cov=./mne_bids --cov-report=xml --verbose --ignore mne-python
run: |
echo "bids-validator"; bids-validator --version
pytest . --cov=./mne_bids --cov-report=xml --verbose --ignore mne-python
- name: Run style & documentation tests
if: "matrix.os == 'ubuntu-latest'"
run: make pep
- name: Upload coverage stats to codecov
if: "matrix.os == 'ubuntu-latest'"
run: bash <(curl -s https://codecov.io/bash)
109 changes: 0 additions & 109 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ recursive-exclude mne_bids *.pyc

recursive-exclude doc *
recursive-exclude paper *

exclude requirements.txt
14 changes: 3 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@

.. image:: https://github.com/mne-tools/mne-bids/workflows/build/badge.svg
:target: https://github.com/mne-tools/mne-bids/actions
:alt: gh-actions

.. image:: https://badges.gitter.im/mne-tools/mne-bids.svg
:target: https://gitter.im/mne-tools/mne-bids?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
:alt: Gitter

.. image:: https://travis-ci.org/mne-tools/mne-bids.svg?branch=master
:target: https://travis-ci.org/mne-tools/mne-bids
:alt: Travis

.. image:: https://ci.appveyor.com/api/projects/status/d4u70pht341cwqxb/branch/master?svg=true
:target: https://ci.appveyor.com/project/mne-tools/mne-bids/branch/master
:alt: Appveyor


.. image:: https://codecov.io/gh/mne-tools/mne-bids/branch/master/graph/badge.svg
:target: https://codecov.io/gh/mne-tools/mne-bids
:alt: codecov


.. image:: https://circleci.com/gh/mne-tools/mne-bids.svg?style=svg
:target: https://circleci.com/gh/mne-tools/mne-bids
:alt: CircleCi


.. image:: https://pepy.tech/badge/mne-bids
:target: https://pepy.tech/project/mne-bids
:alt: Downloads
Expand Down
59 changes: 0 additions & 59 deletions appveyor.yml

This file was deleted.

3 changes: 1 addition & 2 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ channels:
- defaults
- conda-forge
dependencies:
- python<3.7
- python<3.8
- pip<=20
- mkl
- numpy>=1.14
- scipy>=0.18.1
- scikit-learn
- matplotlib
- pip:
- mne_bids>=0.4,<0.5
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ channels:
- defaults
- conda-forge
dependencies:
- python<3.7
- python<3.8
- pip<=20
- mkl
- numpy>=1.14
- scipy>=0.18.1
- scikit-learn
- matplotlib
- pip:
- mne>=0.19.1
Expand Down
4 changes: 2 additions & 2 deletions mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ def _bids_validate():

if platform.system() == 'Windows':
shell = True
bids_validator_exe = ['node', exe, *vadlidator_args]
else:
shell = False
bids_validator_exe = [exe, *vadlidator_args]

bids_validator_exe = [exe, *vadlidator_args]

def _validate(bids_root):
cmd = [*bids_validator_exe, bids_root]
Expand Down
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
numpy>=1.14
scipy>=0.18.1
mne>=0.19.1
nibabel>=2.2
pybv
pytest<5.4
pytest-cov
pytest-sugar
check-manifest
pydocstyle
flake8

0 comments on commit c246eee

Please sign in to comment.