Skip to content

Commit 19617c3

Browse files
committed
update view generation preferences
1 parent fd05f9a commit 19617c3

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.github/workflows/bat.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,12 @@ jobs:
5353
grep "Done TheTruth" output.log
5454
grep "1 Passed" output.log
5555
shell: bash
56-
- name: Generate Model
57-
uses: matlab-actions/run-command@v2
58-
with:
59-
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
6056
- name: Set up diary for logging
6157
run: echo 'diary console.log' >> startup.m
62-
- name: Run run-test command
58+
- name: Run run-test command with artifact generation
6359
continue-on-error: true
6460
uses: ./
6561
with:
66-
test-results-simulink-test: test-results/simulinktest.mldatx
6762
model-coverage-cobertura: test-results/modelcoverage.xml
6863
test-results-pdf: test-results/pdf-results.pdf
6964
test-results-junit: test-results/results.xml
@@ -78,7 +73,6 @@ jobs:
7873
logging-level: Detailed
7974
- name: Verify artifacts generation
8075
run: |
81-
(test -f test-results/simulinktest.mldatx) || (echo "File simulinktest.mldatx does not exist" && exit 1)
8276
(test -f test-results/modelcoverage.xml) || (echo "File modelcoverage.xml does not exist" && exit 1)
8377
(test -f test-results/pdf-results.pdf) || (echo "File pdf-results.pdf does not exist" && exit 1)
8478
(test -f test-results/results.xml) || (echo "File results.xml does not exist" && exit 1)
@@ -94,3 +88,17 @@ jobs:
9488
grep -q "'OutputDetail', 3" console.log
9589
grep -q "'LoggingLevel', 3" console.log
9690
shell: bash
91+
- name: Generate Model
92+
uses: matlab-actions/run-command@v2
93+
with:
94+
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
95+
# Separate test run for SL test results till genscript supports informal testrunner with this parameter
96+
- name: Run run-test command with Simulink Test artifact generation
97+
continue-on-error: true
98+
uses: ./
99+
with:
100+
test-results-simulink-test: test-results/simulinktest.mldatx
101+
- name: Verify artifacts generation
102+
run: |
103+
(test -f test-results/simulinktest.mldatx) || (echo "File simulinktest.mldatx does not exist" && exit 1)
104+
shell: bash

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ async function run() {
4444
core.info("Successfully generated test script!");
4545

4646
await matlab.runCommand(helperScript, platform, architecture, exec.exec, startupOptions).finally(() => {
47-
const testResultsData = testResultsSummary.getTestResults(runnerTemp, runId, actionName, workspaceDir);
48-
testResultsSummary.writeSummary(testResultsData, actionName);
47+
const testResultsData = testResultsSummary.getTestResults(runnerTemp, runId, workspaceDir);
48+
if(testResultsData) {
49+
testResultsSummary.writeSummary(testResultsData, actionName);
50+
}
4951
});
5052
}
5153

0 commit comments

Comments
 (0)