Skip to content

Commit 86b51f7

Browse files
authored
Merge pull request #7 from matlab-actions/mw-hrastega-patch-1
Incorporate editorial feedback
2 parents 29fb9f0 + 2363c1b commit 86b51f7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Action for Running MATLAB Commands
22

3-
The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to execute a MATLAB® script, function, or statement on a [self-hosted](https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners) or [GitHub-hosted](https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners) runner:
3+
The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to execute MATLAB® scripts, functions, or statements on a [self-hosted](https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners) or [GitHub-hosted](https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners) runner:
44

5-
- If you want to use a self-hosted runner, you must set up a computer with MATLAB (R2013b or later) as your runner. The action uses the first MATLAB version on the runner's system path.
5+
- To use a self-hosted runner, you must set up a computer with MATLAB (R2013b or later) as your runner. The action uses the topmost MATLAB version on the runner's system path.
66

7-
- If you want to use a GitHub-hosted runner, you must include the [Set Up MATLAB](https://github.com/matlab-actions/setup-matlab/) action in your workflow to install MATLAB on the runner. Currently, this action is available only for public projects and does not include transformation products, such as MATLAB Coder™ and MATLAB Compiler™.
7+
- To use a GitHub-hosted runner, you must include the [Set Up MATLAB](https://github.com/matlab-actions/setup-matlab/) action in your workflow to install MATLAB on the runner. Currently, this action is available only for public projects. It does not install transformation products, such as MATLAB Coder™ and MATLAB Compiler™.
88

99
## Usage Examples
10-
Use the **Run MATLAB Command** action to run MATLAB scripts, functions, and statements tailored to your specific needs. You can use this action to flexibly customize your test run or add a MATLAB-related step to your workflow.
10+
Use the **Run MATLAB Command** action to run MATLAB scripts, functions, and statements. You can use this action to flexibly customize your test run or add a MATLAB related step to your workflow.
1111

1212
### Run MATLAB Script on Self-Hosted Runner
1313
Use a self-hosted runner to run the commands in a file named `myscript.m` in the root of your repository.
@@ -29,7 +29,7 @@ jobs:
2929
```
3030
3131
### Run MATLAB Commands on GitHub-Hosted Runner
32-
Use the [Set Up MATLAB](https://github.com/matlab-actions/setup-matlab/) action when you want to run MATLAB code or Simulink models on a GitHub-hosted runner. The action installs your specified MATLAB release (R2020a or later) on a Linux® virtual machine. If you do not specify a release, the action installs the latest release of MATLAB.
32+
Before you run MATLAB code or Simulink models on a GitHub-hosted runner, first use the [Set Up MATLAB](https://github.com/matlab-actions/setup-matlab/) action. The action installs your specified MATLAB release (R2020a or later) on a Linux® virtual machine. If you do not specify a release, the action installs the latest release of MATLAB.
3333
3434
For example, install the latest release of MATLAB on a GitHub-hosted runner, and then use the **Run MATLAB Command** action to execute your MATLAB commands.
3535
@@ -52,18 +52,18 @@ jobs:
5252
```
5353
5454
## Run MATLAB Command
55-
When you define your workflow in the `.github/workflows` directory of your repository, you can specify the **Run MATLAB Command** action as `matlab-actions/run-command@v0`. The action requires an input.
55+
When you define your workflow in the `.github/workflows` directory of your repository, specify the **Run MATLAB Command** action as `matlab-actions/run-command@v0`. The action requires an input.
5656

5757
Input | Description
5858
------------------------- | ---------------
59-
`command` | (Required) Script, function, or statement to execute. If the value of `command` is the name of a MATLAB script or function, do not specify the file extension. If you specify more than one MATLAB command, use a comma or semicolon to separate the commands.<br/>**Example:** `myscript`<br/>**Example:** `results = runtests, assertSuccess(results);`
59+
`command` | (Required) Script, function, or statement to execute. If the value of `command` is the name of a MATLAB script or function, do not specify the file extension. If you specify more than one script, function, or statement, use a comma or semicolon to separate them.<br/>**Example:** `myscript`<br/>**Example:** `results = runtests, assertSuccess(results);`
6060

61-
MATLAB exits with exit code 0 if the specified script, function, or statement executes successfully without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the build to fail. You can use the [`assert`](https://www.mathworks.com/help/matlab/ref/assert.html) or [`error`](https://www.mathworks.com/help/matlab/ref/error.html) functions in the command to ensure that builds fail when necessary.
61+
MATLAB exits with exit code 0 if the specified script, function, or statement executes successfully without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the build to fail. To ensure that the build fails in certain conditions, use the [`assert`](https://www.mathworks.com/help/matlab/ref/assert.html) or [`error`](https://www.mathworks.com/help/matlab/ref/error.html) functions.
6262

6363
When you use this action, all of the required files must be on the MATLAB search path.
6464

6565
## Notes
66-
By running the **Run MATLAB Command** action, you will be executing third-party code that is licensed under separate terms.
66+
When you use the **Run MATLAB Command** action, you execute third-party code that is licensed under separate terms.
6767

6868
## See Also
6969
- [Action for Running MATLAB Tests](https://github.com/matlab-actions/run-tests/)

0 commit comments

Comments
 (0)