The verify.yaml workflow runs linting, tests, and optional regression verification for connector repositories.
When a pull request is opened or code is pushed to main, the shared verify workflow:
- Runs
golangci-linton the connector code - Runs
go test(optional, enabled by default) - Runs baton-regression verification (optional, when
connectoris provided)
Checks out the caller repo and runs golangci-lint with a 6-minute timeout. If RELENG_GITHUB_TOKEN is available, configures git for private module access.
Runs go test -v -covermode=count -json ./... and annotates results. Skipped if run_tests: false.
Runs the baton-regression verification when connector is non-empty. The workflow is hosted in this repo but checks out baton-regression source from main at runtime. The regression job:
- Checks out baton-regression and the connector repo
- Builds both the regression tool and the connector binary
- Runs axiom-based structural verification
- Runs static nil pointer analysis
- Uploads verification reports as artifacts
- Posts a summary with coverage metrics
The regression job requires RELENG_GITHUB_TOKEN to be passed from the caller workflow to check out the private baton-regression repo.
| Parameter | Required | Default | Description |
|---|---|---|---|
ref |
Yes | - | Git ref to check out |
run_tests |
No | true |
Whether to run go test |
connector |
No | "" |
Connector name (e.g., baton-okta). Triggers regression when set |
| Secret | Required | Description |
|---|---|---|
RELENG_GITHUB_TOKEN |
No | GitHub token for private module and repo access |
name: Verify
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
jobs:
verify:
uses: ConductorOne/github-workflows/.github/workflows/verify.yaml@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
secrets:
RELENG_GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}jobs:
verify:
uses: ConductorOne/github-workflows/.github/workflows/verify.yaml@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
connector: baton-okta
secrets:
RELENG_GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}jobs:
verify:
uses: ConductorOne/github-workflows/.github/workflows/verify.yaml@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
run_tests: false
secrets:
RELENG_GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}Regression is enabled when the connector's verify.yaml includes a connector: parameter. This is controlled by baton-admin's connectors.yaml:
run_regression: falsein a connector's verify config omits theconnector:parameter, disabling regression- When
run_regressionis absent (default), theconnector:parameter is included and regression runs
To add a connector to regression testing, ensure it passes baton-regression verification locally before removing the run_regression: false flag.