diff --git a/README.md b/README.md index 6cfe6ae..7e7139e 100644 --- a/README.md +++ b/README.md @@ -84,11 +84,20 @@ jobs: When you define your workflow in the `.github/workflows` directory of your repository, specify the **Run MATLAB Build** action as `matlab-actions/run-build@v3`. The action accepts optional inputs. -| Input | Description | -| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `tasks` |

(Optional) MATLAB build tasks to run, specified as a list of task names separated by spaces. If a task accepts arguments, enclose them in parentheses. If you do not specify `tasks`, the action runs the default tasks in your build file as well as all the tasks on which they depend. By default, the action looks for a build file named `buildfile.m` in the root of your repository.

MATLAB exits with exit code 0 if the tasks run without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the action to fail.

**Example:** `tasks: test`
**Example:** `tasks: compile test`
**Example:** `tasks: check test("myFolder",OutputDetail="concise") archive("source.zip")`

| -| `build-options` |

(Optional) MATLAB build options, specified as a list of options separated by spaces. The action supports the same [options](https://www.mathworks.com/help/matlab/ref/buildtool.html#mw_50c0f35e-93df-4579-963d-f59f2fba1dba) that you can pass to the `buildtool` command.

**Example:** `build-options: -continueOnFailure`
**Example:** `build-options: -continueOnFailure -skip test`

| -| `startup-options` |

(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).

Using this input to specify the `-batch` or `-r` option is not supported.

**Example:** `startup-options: -nojvm`
**Example:** `startup-options: -nojvm -logfile output.log`

| +| Input | Description | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tasks` |

(Optional) MATLAB build tasks to run, specified as a list of task names separated by spaces. If a task accepts arguments, enclose them in parentheses. If you do not specify `tasks`, the action runs the default tasks in your build file as well as all the tasks on which they depend. By default, the action looks for a build file named `buildfile.m` in the root of your repository.

MATLAB exits with exit code 0 if the tasks run without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the action to fail.

**Example:** `tasks: test`
**Example:** `tasks: compile test`
**Example:** `tasks: check test("myFolder",OutputDetail="concise") archive("source.zip")`

| +| `build-options` |

(Optional) MATLAB build options, specified as a list of options separated by spaces. The action supports the same [options](https://www.mathworks.com/help/matlab/ref/buildtool.html#mw_50c0f35e-93df-4579-963d-f59f2fba1dba) that you can pass to the `buildtool` command.

**Example:** `build-options: -continueOnFailure`
**Example:** `build-options: -continueOnFailure -skip test`

| +| `generate-summary` |

(Optional) Option to generate summaries of build and test 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 build and test summaries in the GitHub job summary. For more information, see [View Build Results](#view-build-results).

**Example:** `generate-summary: false`

| +| `startup-options` |

(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).

Using this input to specify the `-batch` or `-r` option is not supported.

**Example:** `startup-options: -nojvm`
**Example:** `startup-options: -nojvm -logfile output.log`

| + +## View Build Results + +If you run a MATLAB build and the `generate-summary` input is `true`, you can view the MATLAB build results in the GitHub job summary. After your build runs, the **MATLAB Build Results** table in the summary provides information about each task that was part of the build. + +GitHub job summary, including summaries of MATLAB build and test results. The MATLAB Build Results table includes three tasks. Each table row includes a task name, status, description, and duration. The MATLAB Test Results section shows information about four passed tests from a single test file. + +If you have a MATLAB Test™ license and your MATLAB build runs tests using a [`matlab.buildtool.tasks.TestTask`](https://www.mathworks.com/help/matlab/ref/matlab.buildtool.tasks.testtask-class.html) instance, then the action also generates a summary of test results in the GitHub job summary. For more information about the test results summary, see [View Test and Coverage Results](https://github.com/matlab-actions/run-tests#view-test-and-coverage-results). ## Notes