Skip to content

Commit

Permalink
Create file instead of folder in nnv for testing in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mldiego committed Oct 18, 2023
1 parent e35249b commit 3b41144
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ jobs:
- name: Run all tests
uses: matlab-actions/run-command@v1
with:
command: disp('Running NNV custom testing procedure!'); mkdir('/github_actions-true'); cd("code/nnv"); install; results = runtests('tests', 'IncludeSubfolders', true); assertSuccess(results);
command: disp('Running NNV custom testing procedure!'); diary github_actions.txt; disp('creating file for testing'); diary off; cd("code/nnv"); install; disp(pwd); disp(is_github_actions()); results = runtests('tests', 'IncludeSubfolders', true); assertSuccess(results);
# command: disp('Running NNV custom testing procedure!'); mkdir('/github_actions-true'); cd("code/nnv"); install; results = runtests('tests', 'IncludeSubfolders', true); assertSuccess(results);
4 changes: 3 additions & 1 deletion code/nnv/engine/utils/is_github_actions.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
function out = is_github_actions()
if isfolder('/github_actions-true')
nnvpath = nnvroot();
file_path = [nnvpath, 'github_actions.txt'];
if isfile(file_path)
out = 1;
% 'github actions detected'
else
Expand Down

0 comments on commit 3b41144

Please sign in to comment.