---
title: "Run the checks on every change · Agent Wranglers"
url: https://agentwranglers.se/playbook/engineering/version-control-and-review/continuous-integration
updated: 2026-10-20
licence: "All rights reserved"
---

# Run the checks on every change

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Version control and review](https://agentwranglers.se/playbook/engineering/version-control-and-review)
- Rule: Run the full check on a clean machine for every push and pull request, not only on a developer's computer.
- How: Use a CI service, such as GitHub Actions or GitLab CI. Start from a clean checkout, install from the lock file and run the same script as the deploy. Pin each outside action to a full commit hash, and give the job read-only access, as [build secrets](https://agentwranglers.se/playbook/adversarial-testing/supply-chain-and-setup/ci-secrets) explains. Set a time limit on the job, and cancel older runs for the same branch. Include the [formatter](https://agentwranglers.se/playbook/architecture/structure/one-formatter) in its check mode. Keep it fast, so people wait for it instead of skipping it.
- Check: Push a commit that breaks one test. The pull request shows a failed check within minutes.

Example:

```yaml
# .github/workflows/check.yml
name: check
on: [push, pull_request]
permissions:
  contents: read
concurrency:
  group: check-${{ github.ref }}
  cancel-in-progress: true
jobs:
  check:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
      - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
        with: { node-version-file: .nvmrc }
      - run: npm ci
      - run: ./check.sh
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers engineering playbook: https://agentwranglers.se/playbook/engineering/version-control-and-review/continuous-integration`.

- Previous: [Protect the main branch](https://agentwranglers.se/playbook/engineering/version-control-and-review/protect-the-main-branch)
- Next: [Fix a broken main branch first](https://agentwranglers.se/playbook/engineering/version-control-and-review/keep-main-green)
- [Version control and review](https://agentwranglers.se/playbook/engineering/version-control-and-review)
