https://github.com/lando/run-leia-action
A GitHub action to run leia tests
https://github.com/lando/run-leia-action
devops github-actions
Last synced: about 1 year ago
JSON representation
A GitHub action to run leia tests
- Host: GitHub
- URL: https://github.com/lando/run-leia-action
- Owner: lando
- Created: 2023-05-08T13:20:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T23:08:42.000Z (almost 2 years ago)
- Last Synced: 2025-05-06T08:18:39.625Z (about 1 year ago)
- Topics: devops, github-actions
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Run Leia Action
This is a GitHub action that runs [Leia](https://github.com/lando/leia) tests. It will use the `leia` in your `package.json` if it can and if it can't it will fallback to a globally installed version that is configurable with `version`.
## Required Inputs
These keys must be set correctly for the action to work.
| Name | Description | Example Value |
|---|---|---|
| `leia-test` | The Leia test file to parse and run. | `examples/basics/README.md` |
> **NOTE:** If you want to run multiple tests we recommend you set up a [strategy matrix](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs). See our [dogfooded tests](https://github.com/lando/run-leia-action/blob/main/.github/workflows/pr-files-tests.yml) for an example.
## Optional Inputs
These keys are set to sane defaults but can be modified as needed.
| Name | Description | Default | Example |
|---|---|---|---|
| `cleanup-header` | The cleanup headers to parse. | `Clean,Tear,Burn` | `Destroy` |
| `retry` | The amount of times to retry the test. | `1` | `3` |
| `setup-header` | The setup headers to parse. | `Start,Setup,This is the dawning` | `So it begins!` |
| `shell` | The shell to use. | `auto` | `bash` |
| `stdin` | Attach stdin when the tests are run. | `false` | `true` |
| `test-header` | The test headers to parse. | `Test,Validat,Verif` | `Testing 1 2 3` |
| `timeout` | The amount of time for the test to run before a timeout, in seconds. | `1800` | `7` |
| `version` | The fallback global version of Leia to install if no local version is detected. | `latest` | `0.6.5` |
> **NOTE:** Please read Leia's [shell considerations](https://github.com/lando/leia#shell-considerations) for details on how `shell: auto` works.
## Usage
### Basic Usage
```yaml
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: tests/leia-test-1.md
```
### Advanced Usage
**Everything, everywhere, all at once:**
```yaml
- name: Run Leia Tests
uses: lando/run-leia-action@v2
with:
leia-test: tests/leia-test-1.md
debug: true
cleanup-header: Clean
retry: 0
setup-header: Setup
shell: bash
stdin: true
test-header: Test
timeout: 5
version: "^0.6.5"
```
## Changelog
We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/run-leia-action/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/run-leia-action/releases).
## Releasing
Create a release and publish to [GitHub Actions Marketplace](https://docs.github.com/en/enterprise-cloud@latest/actions/creating-actions/publishing-actions-in-github-marketplace). Note that the release tag must be a [semantic version](https://semver.org/).
## Maintainers
* [@pirog](https://github.com/pirog)
* [@reynoldsalec](https://github.com/reynoldsalec)
## Contributors
Made with [contrib.rocks](https://contrib.rocks).
## Other Resources
* [Important advice](https://www.youtube.com/watch?v=WA4iX5D9Z64)