Skip to content

Commit 04d5166

Browse files
committed
update tests and github action
1 parent 234c07d commit 04d5166

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/bids_validator.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MOxUnit
1+
name: BIDS validator
22

33
on:
44
push:
@@ -12,24 +12,27 @@ env:
1212

1313
jobs:
1414
build:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-20.04
1616
steps:
1717

1818
- uses: actions/checkout@v2
1919
with:
2020
submodules: true
2121
fetch-depth: 1
2222

23-
- name: Make jsonread for octave and update path
23+
- name: Make jsonread for octave
2424
run: |
2525
sudo apt-get -y -qq update
2626
sudo apt-get -y install octave
2727
sudo apt-get -y install liboctave-dev
2828
cd lib/JSONio
2929
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
3030
cd ..
31-
octave $OCTFLAGS --eval "addpath (pwd); savepath ();"
32-
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath ();"
31+
32+
- name: Update octave path
33+
run: |
34+
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'lib'))); savepath();"
35+
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
3336
3437
- name: Install BIDS validator
3538
run: |

.github/workflows/moxunit.yml renamed to .github/workflows/run_tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MOxUnit
1+
name: tests and coverage
22

33
on:
44
push:
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414
steps:
1515

1616
- uses: actions/checkout@v2

tests/test_saveEventsFileInit.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function test_saveEventsFileInitBasic()
2828
expectedStrcut(1).columns.onset.Units = 's';
2929

3030
expectedStrcut(1).columns.trial_type.Description = 'types of trial';
31-
expectedStrcut(1).columns.trial_type.Levels = '';
31+
expectedStrcut(1).columns.trial_type.Levels = struct();
3232

3333
expectedStrcut(1).columns.duration.Description = 'duration of the event or the block';
3434
expectedStrcut(1).columns.duration.Units = 's';
@@ -55,7 +55,7 @@ function test_saveEventsFileInitExtraColumns()
5555
expectedStrcut(1).extraColumns.Speed.length = 1;
5656
expectedStrcut(1).extraColumns.Speed.bids.LongName = '';
5757
expectedStrcut(1).extraColumns.Speed.bids.Description = '';
58-
expectedStrcut(1).extraColumns.Speed.bids.Levels = '';
58+
expectedStrcut(1).extraColumns.Speed.bids.Levels = struct();
5959
expectedStrcut(1).extraColumns.Speed.bids.TermURL = '';
6060
expectedStrcut(1).extraColumns.Speed.bids.Units = '';
6161

@@ -82,13 +82,13 @@ function test_saveEventsFileInitExtraColumnsArray()
8282
expectedStrcut(1).extraColumns.Speed.length = 1;
8383
expectedStrcut(1).extraColumns.Speed.bids.LongName = '';
8484
expectedStrcut(1).extraColumns.Speed.bids.Description = '';
85-
expectedStrcut(1).extraColumns.Speed.bids.Levels = '';
85+
expectedStrcut(1).extraColumns.Speed.bids.Levels = struct();
8686
expectedStrcut(1).extraColumns.Speed.bids.TermURL = '';
8787
expectedStrcut(1).extraColumns.Speed.bids.Units = '';
8888
expectedStrcut(1).extraColumns.LHL24.length = 3;
8989
expectedStrcut(1).extraColumns.LHL24.bids.LongName = '';
9090
expectedStrcut(1).extraColumns.LHL24.bids.Description = '';
91-
expectedStrcut(1).extraColumns.LHL24.bids.Levels = '';
91+
expectedStrcut(1).extraColumns.LHL24.bids.Levels = struct();
9292
expectedStrcut(1).extraColumns.LHL24.bids.TermURL = '';
9393
expectedStrcut(1).extraColumns.LHL24.bids.Units = '';
9494

0 commit comments

Comments
 (0)