Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci test #2154

Merged
merged 8 commits into from
Jun 29, 2023
Merged

Ci test #2154

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ jobs:
- name: Run tests
run: |
export DISPLAY=:99
Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & matlab -nodesktop -nosplash -r "runtests('./test/testAll_ghActions.m');exit;"
Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & /home/aaron/Documents/Matlab/bin/matlab -nodesktop -nosplash -r "runTestsAndGenerateReport;exit;"



- name: Upload Test Report
uses: actions/upload-artifact@v2
with:
name: test-report
path: test_results.txt

2 changes: 1 addition & 1 deletion jenkinstest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test4
test5
13 changes: 13 additions & 0 deletions runTestsAndGenerateReport.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
% Run your tests
testResults = runtests('./test/testAll_ghActions.m');

% Open a file for writing
fid = fopen('test_results.txt', 'w');

% Write the test results to the file
for i = 1:length(testResults)
fprintf(fid, 'Test: %s, Result: %s\n', testResults(i).Name, string(testResults(i).Passed));
end

% Close the file
fclose(fid);