-
Notifications
You must be signed in to change notification settings - Fork 125
107 lines (99 loc) · 3.14 KB
/
test.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test:
name: test (${{ matrix.os }}, py-${{ matrix.python_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', windows-latest, macOS-latest]
python_version: ['3.8']
include:
# Experimental: Python 3.9
# Works fine, commented out because mostly covered (at least installing/building deps) by the typecheck job
# See issue: https://github.com/NeuroTechX/eeg-notebooks/issues/50
#- os: ubuntu-latest
# python_version: 3.9
# Check 3.10 for future-proofing
- os: ubuntu-22.04
python_version: '3.10'
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
# Not needed if pywinhook is installed from wheels
#- name: Install swig
# if: "startsWith(runner.os, 'windows')"
# run: |
# (New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.1.zip","swigwin-4.0.1.zip");
# Expand-Archive .\swigwin-4.0.1.zip .;
# echo "$((Get-Item .).FullName)/swigwin-4.0.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install APT dependencies
if: "startsWith(runner.os, 'Linux')"
run: |
make install-deps-apt
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
- name: Install Linux dependencies
if: "startsWith(runner.os, 'Linux')"
run: |
make install-deps-wxpython
- name: Install dependencies
run: |
make build
- name: Run eegnb install test
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &> xvfb.log &
export DISPLAY=:0
fi
eegnb --help
eegnb runexp --help
- name: Run examples with coverage
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &> xvfb.log &
export DISPLAY=:0
fi
make test
typecheck:
name: typecheck (${{ matrix.os }}, py-${{ matrix.python_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04']
python_version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install APT dependencies
if: "startsWith(runner.os, 'Linux')"
run: |
make install-deps-apt
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
- name: Install Linux dependencies
if: "startsWith(runner.os, 'Linux')"
run: |
make install-deps-wxpython
- name: Install dependencies
run: |
make build
- name: Typecheck
run: |
make typecheck