← All features

Verify and reviewAvailable in v0.3.0

CI starter

oah ci init writes .github/workflows/oah-ci.yml after showing it in full and asking. It runs your tests on the operating systems you choose and a pinned gitleaks secret scan on every push and pull request, with every action pinned to a full commit SHA, read-only permissions and no secrets. Making the checks required is a GitHub setting you add yourself.

When you need it

Without CI, or with CI on one OS only, a change that breaks tests elsewhere or leaks a key reaches the default branch unnoticed.

How it works

  1. Run oah ci init; it looks for your test command (pytest, unittest, npm test, go test or cargo test) and asks whether to use it.
  2. It prints the whole workflow and asks Write .github/workflows/oah-ci.yml? [y/N]; nothing is written unless you answer y.
  3. Two jobs: test once per chosen OS (macos-latest, windows-latest, ubuntu-latest), and secret scan, which checks the gitleaks download by its SHA-256 fingerprint and scans the whole history with --redact --no-banner.
  4. Commit and push; read results in the Actions tab or at the bottom of the pull request.
  5. To block merges until checks pass, add a branch ruleset on GitHub requiring secret scan and one test (…) per OS.

Example

Keep your choices in `.oah/config.toml`; a command-line flag wins (from CI starter).

[ci]
os = ["macos", "windows"]
test_command = "make test"

Requirements

  • A GitHub repository. Rulesets work in public repositories on every plan, and in private ones with GitHub Pro, Team or Enterprise Cloud.
  • npm ci needs a committed package-lock.json.

Limits and recovery

  • oah never changes repository settings; required checks are yours to add.
  • An existing workflow is never replaced silently: --yes alone refuses, and only --force --yes replaces it without asking.
  • If no test command matches, the workflow gets a failing **Run tests (edit me)** step for you to replace.
  • If secret scan fails, rotate the key with its issuer first; deleting it in a new commit leaves it in history.

Original documents

Related