-
Notifications
You must be signed in to change notification settings - Fork 183
84 lines (72 loc) · 2.18 KB
/
test-braindecode.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Test-braindecode
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 ]
python-version: [ "3.8" ]
defaults:
run:
shell: bash
steps:
- name: Checkout MOABB
uses: actions/checkout@v4
- name: Checkout Braindecode
uses: actions/checkout@v4
with:
repository: braindecode/braindecode
path: braindecode
- 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-braindecode-${{ 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
- name: Install library
run: poetry install --no-interaction
- name: Install and test braindecode
run: |
source $VENV
cd braindecode
pip install -e .[tests]
pytest test/
# poetry run pip install -U https://api.github.com/repos/braindecode/braindecode/zipball/master