---
title: CI
order: 7
description: "An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm."
tags: [glossary, execution-and-caching]
---

# CI

An ordinary magusfile-defined target you compose yourself with `magus\needs`:
magus does not hardcode its stages. `Magus.RunCI` treats it specially only in
that it strips the `rw` charm, it is the anchor `magus affected ci` keys off,
and a selected scope with no project declaring it is a load error rather than
a silent no-op.

## Elsewhere

CI usually names the practice, or a hosted service that runs it (GitHub Actions, GitLab CI).
In magus it is an ordinary target named `ci`; a hosted runner calls `magus affected ci` like a
person does.

## Example

A `ci` target composes the stages; nothing about them is built in.

```buzz
export fun ci(ctx: magus\Context, args: [str]) > void {
    ctx.needs(generate, lint, test);
}
```

## Used in

<!-- BEGIN GLOSSARY USAGE (generated by glossary-usage-generate from the knowledge graph; edit the generator, not this list) -->

In the docs:

- [Set the signing secret in CI](../concepts/cache/remote.md#set-the-signing-secret-in-ci)
- [Running under CI](../concepts/ci.md#running-under-ci)
- [CI providers](../concepts/ci/providers.md#ci-providers)
- [npm-ci](../concepts/spells/typescript.md#npm-ci)
- [CI](../concepts/targets/ci.md#ci)
- [CI](../concepts/workspace/affected.md#ci)

In the code (`magus refs <name>` lists every site):

- `config.CI` (Go)

<!-- END GLOSSARY USAGE -->

## See also

- [Targets](../concepts/targets.md#the-target-name)
- [Affected](affected.md)
- [Charm](charm.md)
