CI integration

The exit code is the contract. A mechanism regression should fail a build.

A workflow

yaml
name: mechanism
on:
pull_request:
paths: ["**/reward.py", "**/mechanism.py", "**/validator.py"]
​
jobs:
assay:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: yu7dan/assay@main
with:
mechanism: ci/assay_adapter.py
fail-on-regression: "true"

Action outputs

outputmeaning
failureshow many scenarios broke the mechanism
passedhow many held
reportpath to the markdown report

The action writes the table to the job summary as well, so a failing run explains itself without opening the log.

Without the action

- run: assay run assay_adapter.py -f json -o assay.json
# exit 0 = every scenario held
# exit 1 = at least one broke, and the job fails

Previous

Rating subnets

Next

The library