forked from braindatalab/PyBispectra
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (90 loc) · 2.66 KB
/
unit_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
88
89
90
91
92
name: "unit_tests"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
# Run unit tests
test_pip:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.12"
- os: macos-13 # Intel
python-version: "3.12"
- os: macos-14 # arm64
python-version: "3.12"
- os: windows-latest
python-version: "3.12"
env:
TZ: Europe/Berlin
FORCE_COLOR: true
DISPLAY: ":99.0"
OPENBLAS_NUM_THREADS: "1"
PYTHONUNBUFFERED: "1"
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade --upgrade-strategy eager .[test]
- name: Display versions and environment information
run: |
echo $TZ
date
python --version
which python
- run: pip install -e .
- run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()"
- name: Run pytest
run: python -m coverage run && coverage report
test_conda:
timeout-minutes: 90
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
env:
MKL_NUM_THREADS: '1'
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.12'
steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=${{ env.PYTHON_VERSION }}
- name: Install package and test dependencies
run: |
pip install -e .
pip install .[test]
- name: Display versions and environment information
run: python -c "import pybispectra; import mne; print(f'PyBispectra {pybispectra.__version__}\n'); mne.sys_info()"
- name: Run pytest
run: python -m coverage run && coverage report