Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

CI

Check a project in CI and publish reports.

In CI, run pun check without --fix, so it reports findings without editing files. It exits 0 when clean, 1 on findings, and 2 when Pun could not run. Warnings fail the run only with --deny-warnings or when they exceed --max-warnings.

GitHub Actions

Add this step after your PHP setup and composer install, which installs Pun from require-dev:

- name: Check
  run: vendor/bin/pun check

When GITHUB_ACTIONS=true, Pun adds annotations to its default output. pun check --format=github prints only annotations.

Write a report file

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

--output-format also accepts junit, gitlab, json, xml, and txt.

Add a pre-commit hook

pun check --staged

--staged selects files with staged changes, but Pun checks their working-tree contents, including unstaged edits.

Last updated on

Was this page helpful?