-
Notifications
You must be signed in to change notification settings - Fork 274
76 lines (66 loc) · 2.23 KB
/
Copy pathtest.yml
File metadata and controls
76 lines (66 loc) · 2.23 KB
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
name: Tests
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
octave-smoke:
name: Octave smoke test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Octave
run: |
sudo apt-get update
sudo apt-get install -y octave
- name: Load EEGLAB sample data
run: |
octave --quiet --eval "cd('$GITHUB_WORKSPACE'); eeglab('nogui'); EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', 'sample_data/'); EEG = eeg_checkset(EEG); assert(EEG.nbchan == size(EEG.data, 1)); assert(EEG.pnts == size(EEG.data, 2));"
matlab-smoke:
name: MATLAB smoke test
runs-on: ubuntu-latest
env:
MLM_LICENSE_TOKEN: ${{ secrets.MATLAB_BATCH_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Determine MATLAB availability
id: matlab
shell: bash
run: |
if [ -n "$MLM_LICENSE_TOKEN" ]; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "available=false" >> "$GITHUB_OUTPUT"
fi
- name: Set up MATLAB
if: steps.matlab.outputs.available == 'true'
uses: matlab-actions/setup-matlab@v2
with:
release: R2024b
products: MATLAB
- name: Load EEGLAB sample data
if: steps.matlab.outputs.available == 'true'
uses: matlab-actions/run-command@v2
with:
command: |
cd(getenv('GITHUB_WORKSPACE'));
eeglab('nogui');
EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', 'sample_data/');
EEG = eeg_checkset(EEG);
assert(EEG.nbchan == size(EEG.data, 1));
assert(EEG.pnts == size(EEG.data, 2));
- name: Skip MATLAB smoke
if: steps.matlab.outputs.available != 'true'
run: |
echo "MATLAB smoke skipped because MATLAB_BATCH_TOKEN is not configured."