Skip to content

Commit 14baca8

Browse files
committed
reorganize for github actions
1 parent 2fc70ca commit 14baca8

30 files changed

+139
-114
lines changed

.github/workflows/moxunit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ jobs:
1919
uses: joergbrech/[email protected]
2020
with:
2121
tests: tests
22+
src: src
2223
with_coverage: true
2324
cover_xml_file: coverage.xml
2425
- name: Code coverage
2526
uses: codecov/codecov-action@v1
2627
with:
28+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
2729
file: coverage.xml # optional
2830
flags: unittests # optional
2931
name: codecov-umbrella # optional

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*octave-workspace
77

88
# exclude content of logfiles folders
9-
output/**
9+
tests/output/*
10+
manualTests/output/*
11+
output/*
1012
*.tsv
1113
*.mat
1214

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ install:
2929
- sudo npm install -g bids-validator
3030

3131
before_script:
32+
# Add to src functions to path
33+
- octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath ();"
3234
# Change current directory
33-
- cd tests
35+
- cd manualTests
3436

3537
jobs:
3638
include:
@@ -39,7 +41,7 @@ jobs:
3941
# script: octave $OCTFLAGS --eval "results = runTests; assert(all(~[results.Failed]))"
4042
- stage: "BIDS validator"
4143
name: "Create and check dataset"
42-
script: cd manualTests && octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders
44+
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders
4345
- stage: "Linter"
4446
name: "miss_hit"
4547
script: cd .. && mh_style `pwd`

checkCppBidsDependencies.m

Lines changed: 0 additions & 27 deletions
This file was deleted.
File renamed without changes.

tests/test_createDataDictionary.m renamed to manualTests/test_createDataDictionary.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ function test_createDataDictionaryBasic()
1313
%% set up
1414

1515
cfg.verbose = false;
16+
1617
cfg.subject.subjectNb = 1;
1718
cfg.subject.runNb = 1;
19+
1820
cfg.task.name = 'testtask';
21+
1922
cfg.dir.output = outputDir;
2023

2124
cfg.testingDevice = 'mri';
@@ -32,6 +35,7 @@ function test_createDataDictionaryBasic()
3235

3336
% data to test against
3437
funcDir = fullfile(outputDir, 'source', 'sub-001', 'ses-001', 'func');
38+
3539
jsonFilename = ['sub-001_ses-001_task-testtask_run-001_events_date-' ...
3640
cfg.fileName.date '.json'];
3741

tests/manualTests/test_makeRawDataset.m renamed to manualTests/test_makeRawDataset.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
function test_makeRawDataset()
22

3-
fprintf('\n\n--------------------------------------------------------------------\n\n');
4-
5-
clear;
6-
73
outputDir = fullfile(fileparts(mfilename('fullpath')), 'output');
84

95
if isdir(outputDir)
@@ -16,7 +12,9 @@ function test_makeRawDataset()
1612

1713
cfg.subject.subjectNb = 1;
1814
cfg.subject.runNb = 1;
15+
1916
cfg.task.name = 'testtask';
17+
2018
cfg.dir.output = outputDir;
2119

2220
cfg.bids.datasetDescription.Name = 'dummy';
@@ -77,7 +75,7 @@ function test_makeRawDataset()
7775
funcDir = fullfile(cfg.dir.output, 'source', 'sub-001', 'ses-001', 'func');
7876
boldFilename = 'sub-001_ses-001_task-testtask_run-001_bold.nii.gz';
7977
copyfile( ...
80-
fullfile('..', '..', 'dummyData', 'dummyData.nii.gz'), ...
78+
fullfile('..', 'dummyData', 'dummyData.nii.gz'), ...
8179
fullfile(funcDir, boldFilename));
8280

8381
%%
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)