---
title: CI
description: Run Pun in CI and before each commit.
---

In CI, just run [`pun check`](/docs/commands/check). Without `--fix` it only reports, it never touches your files.

- `0` means all good.
- `1` means it found problems.
- `2` means Pun itself couldn't run.

Warnings don't fail the build, unless you pass `--deny-warnings` or set `--max-warnings`.

## GitHub Actions

If Pun is in your `require-dev`, it's already in `vendor/bin` after `composer install`. Add one step:

```yaml .github/workflows/style.yml
- name: Check
  run: vendor/bin/pun check
```

On GitHub Actions, problems show up as annotations on your PR. Nothing to set up.

## Report files

Need a file for another tool? Write one:

```bash
pun format --test --output-to-file=pun.xml --output-format=checkstyle
```

You can pick `checkstyle`, `junit`, `gitlab`, `json`, `agent` or `github`.

## Before each commit

```bash
pun check --staged
```

This checks only the files you staged. It reads them from disk, so unstaged edits in those files count too.
