Composite actions for the scenarigo users.
run/: Install dependencies (viainstall) and executescenarigo run.build-plugin/: Install dependencies (viainstall), build scenarigo plugins, and expose their paths as outputs.install/: Ensure Go (stable if missing) and install scenarigo CLI (skip when already present with the requested version;latestalso skips reinstall if present).
Installs scenarigo, optionally builds plugins, and runs scenarios.
name: Run scenario tests
on:
pull_request:
jobs:
scenarigo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run scenarigo scenarios
uses: scenarigo/actions/run@v1
with:
scenarigo-version: "latest" # e.g. v0.23.0
working-directory: "."
run-args: "" # e.g. --config scenarigo.yaml --vars vars.yaml
build-plugins: true # set false to skip plugin build
build-args: "" # e.g. --config plugin.yaml
list-args: "" # optional flags for plugin list
report-json: "" # e.g. report.json (adds --report-json)
report-junit: "" # e.g. report-junit.xml (adds --report-junit and publishes Job Summary)Inputs:
scenarigo-version: scenarigo CLI version (default:latest).working-directory: Directory containing scenarigo configuration and scenarios (default:.).run-args: Extra args forscenarigo run(default: empty).build-plugins: Whether to build plugins before running (default:true).build-args: Extra args forscenarigo plugin build(default: empty).list-args: Extra args forscenarigo plugin list(default: empty).report-json: File path for scenarigo JSON report; adds--report-jsonwhen set (default: empty).report-junit: File path for scenarigo JUnit report; adds--report-junitwhen set (default: empty). When provided, the action also runsdorny/test-reporterwith the JUnit file to publish a job summary. Color output is disabled (NO_COLOR=true) when generating JUnit to avoid ANSI codes in the XML.dorny/test-reporterrequires the following permissions in your workflow whenreport-junitis used:
permissions:
contents: read
actions: read
checks: write- Behavior: Uses the
installaction. Ifgois already available, setup-go is skipped; otherwise installs stable.scenarigoinstalls only when not already present or when version differs (forlatest, skips reinstall if present). If thegoversion/platform reported bygo versiondoes not match the tail ofscenarigo version, scenarigo is reinstalled. Plugin build reuses the samescenarigoinstall.
Outputs:
plugin-paths: Newline-separated plugin paths fromscenarigo plugin list(empty if plugin build is skipped).
Build scenarigo plugins and expose plugin paths via outputs.
name: Build Plugins
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build plugins
id: build
uses: scenarigo/actions/build-plugin@v1
with:
scenarigo-version: "latest" # e.g. v0.15.0
working-directory: "."
build-args: "" # e.g. --config plugin.yaml
list-args: "" # optional flags for list
- name: Show plugin paths
run: |
echo "Built plugin paths:"
echo "${{ steps.build.outputs.paths }}"Inputs:
scenarigo-version: scenarigo CLI version (default:latest).working-directory: Directory containing plugin sources/config (default:.).build-args: Extra args forscenarigo plugin build(default: empty).list-args: Extra args forscenarigo plugin list(default: empty).- Behavior: Uses the
installaction. Ifgois already available, setup-go is skipped; otherwise installs stable.scenarigoinstalls only when not already present or when version differs (forlatest, skips reinstall if present). If thegoversion/platform reported bygo versiondoes not match the tail ofscenarigo version, scenarigo is reinstalled.
Outputs:
paths: Newline-separated plugin paths returned byscenarigo plugin list.
Ensure Go and scenarigo CLI are available.
Inputs:
scenarigo-version: scenarigo CLI version (default:latest; skips reinstall if already present whenlatest).
Behavior:
- Skips setup-go when
gois already available; otherwise installs stable Go. - Installs scenarigo only when absent, version differs, or when the Go version/platform from
go versiondiffers from the tail ofscenarigo version(adds install path toGITHUB_PATH).