Skip to content

Commit

Permalink
Fix CI error and CI job name
Browse files Browse the repository at this point in the history
One of the demo datasets is an unzipped tar, which can give an error with untar if an incorrect file extension is specified.
  • Loading branch information
AljenU committed Nov 25, 2021
1 parent 57e1dd1 commit 3618b72
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/aa_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ defaults:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
aatest_ds000114_AROMA:
name: Testing AROMA on fMRI
not_large:
name: Run all tests that do NOT have the Large tag

# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,4 +84,4 @@ jobs:
with:
name: testlog
path: |
$GITHUB_WORKSPACE/developer/aa_test.log
${{github.workspace}}/developer/aa_test.log
9 changes: 8 additions & 1 deletion developer/aa_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,14 @@ function aa_test(varargin)
% The unittest framework catches errors during tests
% Here, throw an error is any test failed. A.o. to notify the
% Continuous Integration of failure.
assertSuccess(results);
if isempty(results)
% Because assertSuccess thinks it is ok to have an empty resultset,
% but we think it is an error in the test filters specification,
% throw an error.
throw(MException('aa_test:emptySelection', 'Test selection after filtering is empty. Not a valid test selection'))
else
assertSuccess(results);
end
end

end
2 changes: 1 addition & 1 deletion examples/utilities/aa_downloaddemo.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function aa_downloaddemo(aap, dataset_id)
aas_log(aap, false, ['INFO: downloading demo data to ' logsafe_path]);

% Download and unpack the data to a temp dir first
tgz_filename = [tempname '.tar.gz'];
tgz_filename = [tempname dataset.filetype];
tgz_filename = websave(tgz_filename, dataset.URL);
unpack_dir = tempname;
untar(tgz_filename, unpack_dir);
Expand Down
4 changes: 3 additions & 1 deletion examples/utilities/aa_downloaddemo_datasets.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@

% Initialise empty struct with correct fields
% This to enforce additions to have the correct fields as well
datasets = struct('ID', {}, 'URL', {}, 'postprocessing', {});
datasets = struct('ID', {}, 'URL', {}, 'filetype', {}, 'postprocessing', {});

datasets(end+1) = struct( ...
'ID', 'aa_demo', ...
'URL', 'https://files.osf.io/v1/resources/umhtq/providers/osfstorage/5b7465680b87a00018c6a76f', ...
'filetype', '.tar.gz', ...
'postprocessing', @post_aa_demo);
datasets(end+1) = struct( ...
'ID', 'ds000114', ...
'URL', 'https://files.osf.io/v1/resources/9q7dv/providers/osfstorage/57e549f9b83f6901d457d162', ...
'filetype', '.tar', ...
'postprocessing', @post_ds000114);

end
Expand Down

0 comments on commit 3618b72

Please sign in to comment.