From ebb0917f814442f706c1653cbf82767c1d0771e0 Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Tue, 8 Dec 2020 16:15:45 -0500
Subject: [PATCH 1/7] Update README.md
---
README.md | 78 +++++++++++++++++++++++++++++++++----------------------
1 file changed, 47 insertions(+), 31 deletions(-)
diff --git a/README.md b/README.md
index 163aabf..eeac780 100644
--- a/README.md
+++ b/README.md
@@ -1,53 +1,69 @@
-# Run MATLAB® Command
+# Action for Running MATLAB Commands
-This action executes a MATLAB script, function, or statement using the _first_
-MATLAB version on the runner's system `PATH`.
+The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to execute a MATLAB® script, function, or statement on a [GitHub-hosted](https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners) or [self-hosted](https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners) runner:
-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/assert.html) functions in
-the command to ensure that builds fail when necessary. When you use this task,
-all of the required files must be on the MATLAB search path.
+- 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 path.
-**Note**: By running the code in this action, you will be executing third-party
-code that is licensed under separate terms.
+- 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™.
-## Usage
+## Usage Examples
+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.
-You can use this action `with`:
-| Argument | Description |
-|-----------|-------------|
-| `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.
**Example**: `myscript`
**Example**: `results = runtests, assertSuccess(results);`
+### Run MATLAB Script on Self-Hosted Runner
+Use a self-hosted runner to run the commands in a file named `myscript.m` in the root of your repository.
-### Using a GitHub-hosted runner?
-If you are using a GitHub-hosted runner, you can use the [Set up MATLAB action](https://github.com/matlab-actions/setup-matlab/) to install MATLAB on the runner.
+```yaml
+name: Use MATLAB in Workflow
+on: [push]
+jobs:
+ my-job:
+ name: Run MATLAB Commands
+ runs-on: self-hosted
+ steps:
+ - name: Run commands in myscript.m
+ uses: matlab-actions/run-command@v0
+ with:
+ command: 'myscript'
+```
-## Example
+### Run MATLAB Commands on GitHub-Hosted Runner
+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.
+
+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.
```yaml
-name: Sample workflow
+name: Use MATLAB in Workflow
on: [push]
-
jobs:
my-job:
- name: Say hello from MATLAB
+ name: Run MATLAB Commands
runs-on: ubuntu-latest
steps:
- # Set up MATLAB using this action first if running on a GitHub-hosted runner!
+ # Install MATLAB on a GitHub-hosted runner
- uses: matlab-actions/setup-matlab@v0
-
- - name: Run "disp('hello world')" directly using MATLAB
uses: matlab-actions/run-command@v0
with:
- command: disp('hello world')
+ command: 'results = runtests, assertSuccess(results);'
```
+## Run MATLAB Command
+When you define your workflow in the `.github/workflows` directory of your repositoy, you can specify the **Run MATLAB Command** action using the `run-command` key. The action requires an input.
+
+Input | Description
+------------------------- | ---------------
+`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.
**Example:** `'myscript'`
**Example:** `'results = runtests, assertSuccess(results);'`
+
+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.
+
+When you use this action, all of the required files must be on the MATLAB search path.
+
+## Notes
+By running the **Run MATLAB Command** action, you will be executing third-party code that is licensed under separate terms.
+
## See also
-- [Set up MATLAB action](https://github.com/matlab-actions/setup-matlab/)
-- [Run MATLAB Tests](https://github.com/matlab-actions/run-tests/)
-- [Continuous Integration - MATLAB & Simulink](https://www.mathworks.com/solutions/continuous-integration.html)
+- [Action for Running MATLAB Tests](https://github.com/matlab-actions/run-tests/)
+- [Action for Installing MATLAB on GitHub-Hosted Runner](https://github.com/matlab-actions/setup-matlab/)
+- [Continuous Integration with MATLAB and Simulink](https://www.mathworks.com/solutions/continuous-integration.html)
## Contact Us
-If you have any questions or suggestions, please contact MathWorks® at continuous-integration@mathworks.com.
+If you have any questions or suggestions, please contact MathWorks® at [continuous-integration@mathworks.com](mailto:continuous-integration@mathworks.com).
From 53d8714ffcf222e38627c27a47072fbe979dd8b5 Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Wed, 9 Dec 2020 14:33:59 -0500
Subject: [PATCH 2/7] Update README.md
---
README.md | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index eeac780..1264e96 100644
--- a/README.md
+++ b/README.md
@@ -13,17 +13,19 @@ Use the **Run MATLAB Command** action to run MATLAB scripts, functions, and stat
Use a self-hosted runner to run the commands in a file named `myscript.m` in the root of your repository.
```yaml
-name: Use MATLAB in Workflow
+name: Run MATLAB Script on Self-Hosted Runner
on: [push]
jobs:
my-job:
- name: Run MATLAB Commands
+ name: Run MATLAB Script
runs-on: self-hosted
steps:
- - name: Run commands in myscript.m
+ - name: Check out repository
+ uses: actions/checkout@v2
+ - name: Run script
uses: matlab-actions/run-command@v0
with:
- command: 'myscript'
+ command: 'myscript'
```
### Run MATLAB Commands on GitHub-Hosted Runner
@@ -32,18 +34,21 @@ Use the [Set Up MATLAB](https://github.com/matlab-actions/setup-matlab/) action
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.
```yaml
-name: Use MATLAB in Workflow
+name: Run MATLAB Commands on GitHub-Hosted Runner
on: [push]
jobs:
my-job:
name: Run MATLAB Commands
runs-on: ubuntu-latest
steps:
- # Install MATLAB on a GitHub-hosted runner
- - uses: matlab-actions/setup-matlab@v0
+ - name: Check out repository
+ uses: actions/checkout@v2
+ - name: Install MATLAB
+ uses: matlab-actions/setup-matlab@v0
+ - name: Run commands
uses: matlab-actions/run-command@v0
with:
- command: 'results = runtests, assertSuccess(results);'
+ command: 'results = runtests, assertSuccess(results);'
```
## Run MATLAB Command
From b1767a0f9ffc157a9a20981c5396eb0ce881ecc7 Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Fri, 11 Dec 2020 11:01:58 -0500
Subject: [PATCH 3/7] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 1264e96..77129bd 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ jobs:
```
## Run MATLAB Command
-When you define your workflow in the `.github/workflows` directory of your repositoy, you can specify the **Run MATLAB Command** action using the `run-command` key. The action requires an input.
+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.
Input | Description
------------------------- | ---------------
From 5f2020683256afe48cfc2efa6108070f9f2f397b Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Fri, 11 Dec 2020 11:14:23 -0500
Subject: [PATCH 4/7] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 77129bd..7774175 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to execute a MATLAB® script, function, or statement on a [GitHub-hosted](https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners) or [self-hosted](https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners) runner:
-- 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 path.
+- 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.
- 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™.
From 39109d659551954248475321504c1ab9ecd9baac Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Fri, 11 Dec 2020 11:50:39 -0500
Subject: [PATCH 5/7] Update README.md
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 7774175..5c639ea 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ jobs:
- name: Run script
uses: matlab-actions/run-command@v0
with:
- command: 'myscript'
+ command: myscript
```
### Run MATLAB Commands on GitHub-Hosted Runner
@@ -48,7 +48,7 @@ jobs:
- name: Run commands
uses: matlab-actions/run-command@v0
with:
- command: 'results = runtests, assertSuccess(results);'
+ command: results = runtests, assertSuccess(results);
```
## Run MATLAB Command
@@ -56,7 +56,7 @@ When you define your workflow in the `.github/workflows` directory of your repos
Input | Description
------------------------- | ---------------
-`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.
**Example:** `'myscript'`
**Example:** `'results = runtests, assertSuccess(results);'`
+`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.
**Example:** `myscript`
**Example:** `results = runtests, assertSuccess(results);`
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.
From 8894a876e4916c5a4d5e8f06ec6504d6ed71e442 Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Thu, 17 Dec 2020 11:06:18 -0500
Subject: [PATCH 6/7] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5c639ea..34e3793 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ When you use this action, all of the required files must be on the MATLAB search
## Notes
By running the **Run MATLAB Command** action, you will be executing third-party code that is licensed under separate terms.
-## See also
+## See Also
- [Action for Running MATLAB Tests](https://github.com/matlab-actions/run-tests/)
- [Action for Installing MATLAB on GitHub-Hosted Runner](https://github.com/matlab-actions/setup-matlab/)
- [Continuous Integration with MATLAB and Simulink](https://www.mathworks.com/solutions/continuous-integration.html)
From 6db556026576f0e1f043bd1aebc8dc0b93fc24f1 Mon Sep 17 00:00:00 2001
From: mw-hrastega <48831250+mw-hrastega@users.noreply.github.com>
Date: Thu, 17 Dec 2020 14:07:36 -0500
Subject: [PATCH 7/7] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 34e3793..8267059 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Action for Running MATLAB Commands
-The [Run MATLAB Command](#run-matlab-command) GitHub® action enables you to execute a MATLAB® script, function, or statement on a [GitHub-hosted](https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners) or [self-hosted](https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners) runner:
+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:
- 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.