Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft instructions on using industrial_ci with act #746

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,41 @@ Since v0.6.0, you can run locally using ``.travis.yml`` you already defined for

rosrun industrial_ci run_travis --help

Run locally using GitHub-Workflow config
++++++++++++++++++++++++++++++++++++++++

Since <add_version_here when #743 is merged> you can run locally GitHub actions using industrial_ci.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: replace


In general, to run GH-Actions locally, you need [`act`](https://github.com/nektos/act).
For its installation, follow the [official install instructions](https://github.com/nektos/act#installation).
Installation in short:
* install docker engine;
* install `act` using [bash script](https://github.com/nektos/act#bash-script) (tested on Ubuntu and its derivatives);
* When asked about `act` image you would like to install, choose medium (default choice).

Before running a GH-Action locally, please check that you are using the `industrial_ci` as follows:
```
- uses: ros-industrial/industrial_ci@master
with:
config: ${{toJSON(matrix.env)}}
```

Often used configuration is actually not supported by GH (more details in #590)
```
- uses: ros-industrial/industrial_ci@master
env: ${{matrix.env}}
```

After that, go to the package you would like to test and start a workflow using act:
- `act` - execute all workflows
- `act -l` - list all defined workflows
- `act -j <my_workflow` - execute specific workflow

Some useful flags:
- to get more detailed output, use `-v` flag
- to reuse action containers, use `-r` flag (makes your actions much faster)
- for everything else check [`act` flags](https://github.com/nektos/act#flags)

Recurring runs for debugging
++++++++++++++++++++++++++++
Please note that ``run_ci`` and ``run_travis`` will download all dependencies every time, just as CI services would do.
Expand Down