-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (84 loc) · 2.67 KB
/
tests.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
85
86
87
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
push:
branches: ['**']
pull_request:
branches: ['**']
create:
branches: [main]
tags: ['**']
jobs:
pytest:
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
mne-version: [mne-main]
qt: [PyQt6]
include:
- os: macos-latest
python-version: "3.11"
mne-version: mne-stable
qt: PyQt6
# Old (and PyQt5)
- os: ubuntu-latest
python-version: "3.10"
mne-version: mne-stable
qt: PyQt5
# PySide6
- os: ubuntu-latest
python-version: "3.11"
mne-version: mne-main
qt: PySide6
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
- name: Install Python dependencies using pip
run: python -m pip install --upgrade pip setuptools_scm setuptools
- name: Clone MNE stable
if: "matrix.mne-version == 'mne-stable'"
run: git clone --single-branch --branch maint/1.7 https://github.com/mne-tools/mne-python.git
- name: Clone MNE main
if: "matrix.mne-version == 'mne-main'"
run: git clone --single-branch --branch main https://github.com/mne-tools/mne-python.git
- run: pip install -ve ./mne-python
- run: pip install -v ${{ matrix.qt }}!=6.6.0 "PyQt6-Qt6!=6.6.0,!=6.7.0"
- run: pip install -ve .[tests]
- run: mne sys_info
# Check Qt
- run: ./tools/check_qt_import.sh $MNE_QT_BACKEND
if: ${{ env.MNE_QT_BACKEND != '' }}
name: Check Qt
shell: bash
- run: python -c "import mne_gui_addons; print(mne_gui_addons.__version__)"
- run: ./tools/get_testing_version.sh
working-directory: mne-python
shell: bash
name: 'Get testing version'
- uses: actions/cache@v4
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- run: ./tools/github_actions_download.sh
shell: bash
working-directory: mne-python
- name: Run pytest
run: pytest mne_gui_addons --cov-report=xml
- name: Upload coverage stats to codecov
uses: codecov/codecov-action@v4
with:
token: ebcd818a-7a71-470d-b667-7cd9c3003c7d
if: success() || failure()