https://github.com/wokwi/wokwi-ci-action
Use the Wokwi Embedded Systems Simulator in your CI workflow
https://github.com/wokwi/wokwi-ci-action
Last synced: 10 months ago
JSON representation
Use the Wokwi Embedded Systems Simulator in your CI workflow
- Host: GitHub
- URL: https://github.com/wokwi/wokwi-ci-action
- Owner: wokwi
- License: mit
- Created: 2023-05-05T22:00:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-18T20:27:07.000Z (over 1 year ago)
- Last Synced: 2025-01-16T14:49:51.922Z (11 months ago)
- Size: 11.7 KB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wokwi-ci-action
GitHub action for using Wokwi Embedded Systems Simulator in your CI workflow.
## Usage
Add the following step to your workflow:
```yaml
- name: Test with Wokwi
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: / # directory with wokwi.toml, relative to repo's root
timeout: 10000
expect_text: 'Hello, world!'
fail_text: 'Error'
scenario: 'test-hello-world.yaml' # optional
serial_log_file: 'log-hello-world.txt' # optional
```
You need to set the `WOKWI_CLI_TOKEN` secret in your repository settings. You can get the token from the [Wokwi CI Dashboard](https://wokwi.com/dashboard/ci).
Your repository needs to contain a `wokwi.toml` file that describes the simulation to run, and a `diagram.json` file that describes the components in the simulation and their connections. For more information, see the [project config documentation](https://docs.wokwi.com/vscode/project-config).
## Inputs
| Name | Description | Default |
|-------------------|----------------------------------------------------------------------------------|---------------|
| `token` | Wokwi CLI token | |
| `path` | Path to the project directory (where wokwi.toml is) | / |
| `timeout` | Timeout in milliseconds | 10000 |
| `expect_text` | Text to expect in the serial output | |
| `fail_text` | Text that indicates a test failure | |
| `scenario` | Path to scenario yaml file (relative to project directory) | |
| `serial_log_file` | Serial log file to be written (relative to project directory) | / |
| `diagram_file` | Path to diagram.json file (relative to project directory) | diagram.json |
| `elf` | Path to the ELF file to load into the simulation (relative to project directory) | wokwi.toml \* |
\* If not specified, the action will look for the `firmware` or `elf` keys in the `wokwi.toml` file.