Skip to content

Commit b9019e9

Browse files
authored
Merge pull request #13 from matlab-actions/jpereira/market
Doc adjustments for v1
2 parents f32a05c + 4b18b69 commit b9019e9

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to
44

55
- 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-
- 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™.
7+
- To use a GitHub-hosted runner, you must include the [Setup MATLAB](https://github.com/matlab-actions/setup-matlab/) action in your workflow to set up MATLAB on the runner. Currently, this action is available only for public projects. It does not set up 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. 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.
@@ -23,15 +23,15 @@ jobs:
2323
- name: Check out repository
2424
uses: actions/checkout@v2
2525
- name: Run script
26-
uses: matlab-actions/run-command@v0
26+
uses: matlab-actions/run-command@v1
2727
with:
2828
command: myscript
2929
```
3030
3131
### Run MATLAB Commands on GitHub-Hosted Runner
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.
32+
Before you run MATLAB code or Simulink models on a GitHub-hosted runner, first use the [Setup MATLAB](https://github.com/matlab-actions/setup-matlab/) action. The action sets up your specified MATLAB release (R2020a or later) on a Linux® virtual machine. If you do not specify a release, the action sets up the latest release of MATLAB.
3333
34-
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.
34+
For example, set up the latest release of MATLAB on a GitHub-hosted runner, and then use the **Run MATLAB Command** action to execute your MATLAB commands.
3535
3636
```yaml
3737
name: Run MATLAB Commands on GitHub-Hosted Runner
@@ -43,24 +43,24 @@ jobs:
4343
steps:
4444
- name: Check out repository
4545
uses: actions/checkout@v2
46-
- name: Install MATLAB
47-
uses: matlab-actions/setup-matlab@v0
46+
- name: Set up MATLAB
47+
uses: matlab-actions/setup-matlab@v1
4848
- name: Run commands
49-
uses: matlab-actions/run-command@v0
49+
uses: matlab-actions/run-command@v1
5050
with:
5151
command: results = runtests, assertSuccess(results);
5252
```
5353
5454
## Run MATLAB Command
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.
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@v1`. The action requires an input.
5656

57-
Input | Description
58-
------------------------- | ---------------
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);`
57+
Input | Description
58+
------------------------- | ---------------
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

6161
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

63-
When you use this action, all of the required files must be on the MATLAB search path. If your script or function is not in the root of your repository, you can use the [`addpath`](https://www.mathworks.com/help/matlab/ref/addpath.html), [`cd`](https://www.mathworks.com/help/matlab/ref/cd.html), or [`run`](https://www.mathworks.com/help/matlab/ref/run.html) functions to ensure that it is on the path when invoked. For example, to run `myscript.m` in a folder `myfolder` located in the root of the repository, you can specify `command` like this:
63+
When you use this action, all of the required files must be on the MATLAB search path. If your script or function is not in the root of your repository, you can use the [`addpath`](https://www.mathworks.com/help/matlab/ref/addpath.html), [`cd`](https://www.mathworks.com/help/matlab/ref/cd.html), or [`run`](https://www.mathworks.com/help/matlab/ref/run.html) functions to ensure that it is on the path when invoked. For example, to run `myscript.m` in a folder `myfolder` located in the root of the repository, you can specify `command` like this:
6464

6565
`command: addpath('myfolder'), myscript`
6666

@@ -69,7 +69,7 @@ When you use the **Run MATLAB Command** action, you execute third-party code tha
6969

7070
## See Also
7171
- [Action for Running MATLAB Tests](https://github.com/matlab-actions/run-tests/)
72-
- [Action for Installing MATLAB on GitHub-Hosted Runner](https://github.com/matlab-actions/setup-matlab/)
72+
- [Action for Setting Up MATLAB on GitHub-Hosted Runner](https://github.com/matlab-actions/setup-matlab/)
7373
- [Continuous Integration with MATLAB and Simulink](https://www.mathworks.com/solutions/continuous-integration.html)
7474

7575
## Contact Us

0 commit comments

Comments
 (0)