Skip to content

CI/CD and where checks run

How pipelines build, test, and release each change, where checks run from pre-commit hooks to CI, and how coding agents change the load.

Start here

What is CI/CD?

CI/CD is the practice of merging code often and building and testing each change automatically, so the software stays ready to release at any time.

10 min read

Concepts

  • What is a pre-commit hook?

    A pre-commit hook is a script Git runs before it records a commit, used to lint, format, or test the staged changes and stop the commit if a check fails.

  • What are agent hooks (Stop hooks)?

    Agent hooks are scripts a coding agent runs at set points in its loop, e.g. a Stop hook that runs the tests before the agent can end its turn.

  • What are DORA metrics?

    DORA metrics are five measures of software delivery, covering change lead time, deployment frequency, recovery time, change failure rate, and rework rate.

  • What are Git hooks?

    Git hooks are scripts that Git runs automatically at set points, e.g. before a commit, so a team can check or change the work at each step.

  • What are required status checks?

    Required status checks are CI results that must pass before a pull request can merge into a protected branch, set by branch protection rules or rulesets.

  • What is a merge queue?

    A merge queue lines up approved pull requests and tests each one against the current main branch before merging, so main stays green as changes pile up.

  • What is a quality gate in CI/CD?

    A quality gate is a checkpoint where a change must meet agreed criteria, e.g. passing tests, before it moves on to the next stage of delivery.

  • What is CI failure triage?

    CI failure triage is deciding why a CI run failed, whether from a bug in the change, a flaky test, the environment, or the pipeline, and who should act.

  • What is continuous integration (CI)?

    Continuous integration is merging every developer's changes into the main branch often, with an automated build and tests run on each merge.

  • What is shift-left testing?

    Shift-left testing moves testing earlier in development, so problems are found when a change is small and cheap to fix instead of after release.

  • What is test impact analysis?

    Test impact analysis maps which tests exercise which code, so a change runs only the tests it could affect instead of the whole suite.

  • What is trunk-based development?

    Trunk-based development is a branching model where developers merge small changes into one main branch at least daily, with no long-lived branches.

How-to guides

  • How to run CI checks locally

    Running CI checks locally means repeating a CI pipeline, e.g. a GitHub Actions workflow, on a developer's machine or in a container before a push.

  • How to run tests in GitHub Actions

    Running tests in GitHub Actions means adding a workflow file that installs a project, runs its tests on each push or pull request, and reports the result.

Comparisons

Common questions

Terms in this topic

Agent hook
An agent hook is a script that a coding agent's harness runs at a fixed point in its loop. A Stop hook runs when the agent tries to end its turn.
CI failure triage
CI failure triage is the work of deciding why a continuous integration run failed, e.g. a real bug or a flaky test, and who should act on the failure.
CI pipeline
A CI pipeline is the ordered set of automated steps, e.g. build, test, and package, that runs each time code is pushed or merged.
CI/CD
CI/CD is a practice that merges code often and builds and tests each change in an automated pipeline, so the software is kept ready to release.
Continuous delivery
Continuous delivery is a practice that keeps every change that passes the pipeline ready to release, so a person can release it to production at any time with one decision.
Continuous deployment
Continuous deployment is a practice that releases every change that passes the automated pipeline to production, with no manual approval step between the merge and the release.
Continuous integration (CI)
Continuous integration is a practice that merges every developer's changes into the main branch often, with an automated build and test run on each merge.
DORA metrics
DORA metrics are five measures of software delivery from the DevOps Research and Assessment program, covering how quickly changes ship and how often deployments fail or need rework.
Hook
A hook is a script that a tool runs automatically at a set point in its workflow, e.g. Git running a check before it records a commit.
Merge queue
A merge queue is a system that tests each approved pull request against the current main branch and the changes ahead of it, and merges only those that pass.
Pre-commit hook
A pre-commit hook is a script that Git runs before it records a commit. It can lint, format, or test the staged changes and stop the commit if a check fails.
Pre-push hook
A pre-push hook is a script that Git runs before it sends commits to a remote repository, which can run slower checks than a pre-commit hook and stop the push.
Quality gate
A quality gate is a point in a delivery pipeline where a change is measured against set criteria before it goes further. Some gates block the change, and others only report.
Required status check
A required status check is a named check result that must pass before a pull request can merge into a protected branch, set by a branch protection rule or a ruleset.
Shift left
Shift left is an approach that moves testing and other quality checks earlier in development, when a problem is smaller and cheaper to fix.
Test impact analysis
Test impact analysis is a technique that maps which tests exercise which code, so a change runs only the tests it could affect instead of the whole suite.
Trunk-based development
Trunk-based development is a branching model in which developers merge small changes into one main branch at least once a day, instead of keeping long-lived branches.

17 terms from the Learning Center glossary.