Skip to main content

GitHub Actions

Basic Setup

Add React Doctor to your workflow:
.github/workflows/react-doctor.yml

Diff Mode (PR Only)

Scan only changed files in pull requests:
.github/workflows/react-doctor.yml
Setting github-token automatically posts scan results as a PR comment

Monorepo Workflow

Scan specific workspace projects:
.github/workflows/react-doctor.yml

Use Score in Next Steps

Access the health score in subsequent workflow steps:
.github/workflows/react-doctor.yml

Matrix Strategy for Multiple Projects

Run parallel jobs for different workspace projects:
.github/workflows/react-doctor.yml

GitLab CI

Basic Pipeline

.gitlab-ci.yml

With Diff Mode

.gitlab-ci.yml

Store Score as Artifact

.gitlab-ci.yml

CircleCI

Basic Config

.circleci/config.yml

With Caching

.circleci/config.yml

Jenkins

Declarative Pipeline

Jenkinsfile

With Diff Mode

Jenkinsfile

Bitbucket Pipelines

bitbucket-pipelines.yml

Fail-On Levels

Control when CI should fail based on diagnostic severity:

Action Inputs Reference

Tips

Use fail-on: warning for stricter quality gates on main branches
Use fail-on: none during initial adoption to avoid blocking PRs
Always use fetch-depth: 0 with --diff mode to access full git history