Skip to content

Commit 112adce

Browse files
authored
Update README for code coverage and summary options
1 parent c202750 commit 112adce

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ The **Run MATLAB Tests** action accepts optional inputs. For example, you can ad
129129
| `test-results-simulink-test` | <p>(Optional) Location to export Simulink Test Manager results in MLDATX format, specified as a file path relative to the project root folder. This input requires a Simulink Test license and is supported in MATLAB R2019a and later.</p><p>**Example:** `test-results-simulink-test: test-results/results.mldatx`</p> |
130130
| `code-coverage-html` | <p>(Optional) Location to write the code coverage results in HTML format, specified as a folder path relative to the project root folder. The results include statement and function coverage metrics. </p><p>**Example:** `code-coverage-html: code-coverage`</p> |
131131
| `code-coverage-cobertura` | <p>(Optional) Location to write the code coverage results in Cobertura XML format, specified as a file path relative to the project root folder.</p><p>**Example:** `code-coverage-cobertura: code-coverage/coverage.xml`</p> |
132-
| `code-coverage-metric-level` | <p>(Optional) Level of code coverage metrics to include in the GitHub job summary, specified as `statement`, `decision`, `condition`, or `mcdc`. By default, the action uses the highest level (`mcdc`) when generating the coverage summary, which results in a table that includes the function, statement, decision, condition, and modified condition/decision coverage (MC/DC) metrics. Use this input to include metrics up to and including a specific level, instead of the highest possible level. For example, to include only function and statement coverage metrics, specify `code-coverage-metric-level` as `statement`. For more information about coverage metric levels, see [Types of Code Coverage for MATLAB Source Code](https://www.mathworks.com/help/matlab-test/ug/types-of-code-coverage-for-matlab-source-code.html).</p><p>For the action to include coverage metrics in the GitHub job summary, the following requirements must be met:<ul><li>MATLAB Test&reg; must be installed and licensed on the runner.</li><li>You must not specify the `code-coverage-html` or `code-coverage-cobertura` inputs. If you specify either input, the action writes the code coverage results to the specified location but does not include coverage metrics in the GitHub job summary.</li></ul></p><p>**Example:** `code-coverage-metric-level: statement`</p> |
132+
| `code-coverage-metric-level` | <p>(Optional) Level of code coverage metrics to include in the GitHub job summary, specified as `statement`, `decision`, `condition`, or `mcdc`. By default, the action uses the highest level (`mcdc`) when generating the coverage summary, which results in a table that includes the function, statement, decision, condition, and modified condition/decision coverage (MC/DC) metrics. Use this input to include metrics up to and including a specific level, instead of the highest possible level. For example, to include only function and statement coverage metrics, specify `code-coverage-metric-level` as `statement`. For more information about coverage metric levels, see [Types of Code Coverage for MATLAB Source Code](https://www.mathworks.com/help/matlab-test/ug/types-of-code-coverage-for-matlab-source-code.html).</p><p>For the action to include coverage metrics in the GitHub job summary, the following requirements must be met:<ul><li>MATLAB Test&trade; must be installed and licensed on the runner.</li><li>You must not specify the `code-coverage-html` or `code-coverage-cobertura` inputs. If you specify either input, the action writes the code coverage results to the specified location but does not include coverage metrics in the GitHub job summary.</li></ul></p><p>**Example:** `code-coverage-metric-level: statement`</p> |
133133
| `model-coverage-html` | <p>(Optional) Location to write the model coverage results in HTML format, specified as a folder path relative to the project root folder. This input requires a Simulink Coverage&trade; license and is supported in MATLAB R2018b and later.</p><p>**Example:** `model-coverage-html: model-coverage`</p> |
134134
| `model-coverage-cobertura` | <p>(Optional) Location to write the model coverage results in Cobertura XML format, specified as a file path relative to the project root folder. This input requires a Simulink Coverage license and is supported in MATLAB R2018b and later.</p><p>**Example:** `model-coverage-cobertura: model-coverage/coverage.xml`</p> |
135-
| `generate-summary` | <p>(Optional) Option to generate summaries of test and coverage results in the GitHub job summary, specified as `true` or `false`. By default, the value is `true`. If you specify a value of `false`, the action does not generate test and coverage summaries in the GitHub job summary.</p><p>For more information about test and coverage summaries, see [View Test and Coverage Results](#view-test-and-coverage-results).</p><p>**Example:** `generate-summary: false`</p> |
135+
| `generate-summary` | <p>(Optional) Option to generate summaries of test and coverage results in the GitHub job summary, specified as `true` or `false`. By default, the value is `true`. If you specify a value of `false`, the action does not generate test and coverage summaries in the GitHub job summary. Generating test and coverage summaries requires a MATLAB Test licesne.</p><p>For more information about test and coverage summaries, see [View Test and Coverage Results](#view-test-and-coverage-results).</p><p>**Example:** `generate-summary: false`</p> |
136136
| `startup-options` | <p>(Optional) MATLAB startup options, specified as a list of options separated by spaces. For more information about startup options, see [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).</p><p>Using this input to specify the `-batch` or `-r` option is not supported.</p><p>**Example:** `startup-options: -nojvm`<br/>**Example:** `startup-options: -nojvm -logfile output.log`</p> |
137137

138138
## View Test and Coverage Results
139139

140-
With a MATLAB Test license, you can view test results and code coverage metrics for your source code in the GitHub job summary when the `generate-summary` input is `true`.
140+
If you have a MATLAB Test license and the `generate-summary` input is `true`, you can view test results and code coverage metrics for your source code in the GitHub job summary.
141141

142-
<img width="2011" height="2001" alt="Workflow run summary page showing four passed tests from a single test file. The MATLAB Code Coverage table displays the collected code coverage metrics for the source code. In the All tests table, the expanded row displays a table of test results for the test file." src="https://github.com/user-attachments/assets/128f4caf-157f-44e1-8347-91b907d9b64b" />
142+
<img width="2011" height="2001" alt="GitHub job summary showing four passed tests from a single test file. The MATLAB Code Coverage table displays the collected code coverage metrics for the source code. In the All tests table, the expanded row displays a table of test results for the test file." src="https://github.com/user-attachments/assets/128f4caf-157f-44e1-8347-91b907d9b64b" />
143143

144144
### Test Results Summary
145145

0 commit comments

Comments
 (0)