-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ jobs: | |
matrix: | ||
version: [R2021a, R2023a] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
test: [slow, fast] | ||
|
||
|
||
runs-on: ${{matrix.os}} | ||
|
@@ -61,6 +62,10 @@ jobs: | |
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1 | ||
git clone https://github.com/MOcov/MOcov.git --depth 1 | ||
- name: set environment variable | ||
if: matrix.test == 'slow' | ||
run: export SLOW=true | ||
|
||
- name: Run commands | ||
uses: matlab-actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function test_suite = test_download_ds %#ok<*STOUT> | ||
|
||
try % assignment of 'localfunctions' is necessary in Matlab >= 2016 | ||
test_functions = localfunctions(); %#ok<*NASGU> | ||
catch % no problem; early Matlab versions can use initTestSuite fine | ||
end | ||
initTestSuite; | ||
|
||
end | ||
|
||
function test_download_ds_moae() | ||
|
||
if ~run_slow_test_only() | ||
moxunit_throw_test_skipped_exception('slow test only'); | ||
end | ||
|
||
output_dir = bids.util.download_ds('source', 'spm', ... | ||
'demo', 'moae', ... | ||
'out_path', temp_dir(), ... | ||
'force', false, ... | ||
'verbose', true, ... | ||
'delete_previous', false); | ||
|
||
output_dir = bids.util.download_ds('source', 'spm', ... | ||
'demo', 'moae', ... | ||
'out_path', temp_dir(), ... | ||
'force', true, ... | ||
'verbose', true, ... | ||
'delete_previous', false); | ||
|
||
output_dir = bids.util.download_ds('source', 'spm', ... | ||
'demo', 'moae', ... | ||
'out_path', temp_dir(), ... | ||
'force', true, ... | ||
'verbose', true, ... | ||
'delete_previous', true); | ||
|
||
end | ||
|
||
function test_download_ds_facerep() | ||
|
||
if ~run_slow_test_only() | ||
moxunit_throw_test_skipped_exception('slow test only'); | ||
end | ||
|
||
output_dir = bids.util.download_ds('source', 'spm', ... | ||
'demo', 'facerep', ... | ||
'out_path', temp_dir(), ... | ||
'force', true, ... | ||
'verbose', true, ... | ||
'delete_previous', true); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function value = run_slow_test_only() | ||
% (C) Copyright 2023 BIDS-MATLAB developers | ||
SLOW = getenv('SLOW'); | ||
value = false; | ||
if ~isempty(SLOW) | ||
value = true; | ||
end | ||
end |