In one line
expected workflow behavior
vs
actual workflow run payload
Workflow Flow
This project does not execute workflows. It validates a normalized description of a
workflow run against a contract you declared in CUE.
In one line
expected workflow behavior
vs
actual workflow run payload
Important
Capture
The normalized payload is the contract boundary. It is the same shape whether it comes from fixtures, a local capture flow, or a CI run.
Emit one fragment per job
github-actionspec emit-fragment \
--job build \
--result success \
--output contract_build=build-ts-service \
--matrix app=build-ts-service \
--file .github/actionspec-fragments/build.json
Capture them into one payload
github-actionspec capture \
--workflow ci.yml \
--ref main \
--job-file .github/actionspec-fragments \
--output .github/actionspec-artifacts/ci-main.json
Validation
`validate-callers`
needs.*.outputs.* references.`validate-repo`
`dashboard`
Action usage
Capture mode
- uses: v4lproik/github-actionspec-rs@main
id: actionspec-capture
with:
mode: capture
workflow: ci.yml
ref-name: main
capture-job-files: |
${{ steps.build.outputs.fragment-path }}
${{ steps.tests.outputs.fragment-path }}
capture-file: /github/runner_temp/actionspec/workflow-run.json
Validate mode
- uses: v4lproik/github-actionspec-rs@main
with:
repo: .
workflow: ci.yml
actual: ${{ steps.actionspec-capture.outputs.capture-path }}
report-file: /github/runner_temp/actionspec/report.json
dashboard-file: /github/runner_temp/actionspec/dashboard.md