# Ginkgo CI Setup

Sets the Ginkgo CI flag set and explains why each flag is used.

- Repository: https://github.com/onsi/ginkgo (9071 stars)
- Category: DevOps
- License: MIT
- Last updated: 2026-10-09
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add onsi/ginkgo --skill ci -g -a claude-code -y`
Codex: `npx skills add onsi/ginkgo --skill ci -g -a codex -y`
Cursor: `npx skills add onsi/ginkgo --skill ci -g -a cursor -y`
Gemini CLI: `npx skills add onsi/ginkgo --skill ci -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add onsi/ginkgo`

## Description

Configure Ginkgo for continuous integration, the recommended CLI flag set and the rationale for each flag (-r -p --randomize-all --randomize-suites --fail-on-pending --fail-on-empty --keep-going --cover --race --trace --json-report --timeout --poll-progress-after/-interval), invoking via go run to pin the CLI to go.mod, the exit-code safeguards that catch committed Focus/Pending and empty filters, collecting report and coverage artifacts with --output-dir, CI-friendly output (--github-output/--force-newlines/--no-color), and the fixed per-suite cost --race adds (GORACE=atexit_sleep_ms=0). Use when setting up or hardening a CI pipeline for a Ginkgo suite.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Ginkgo in CI

A CI invocation should maximize signal, surface flakes and spec pollution, catch mistakes that pass locally, and emit machine-readable artifacts, while collecting *every* failure in one run. This builds on the CLI (`ginkgo:running`) and report formats (`ginkgo:reporting`). Full rationale: <https://onsi.github.io/ginkgo/#recommended-continuous-integration-configuration>.

## The recommended flag set

Invoke via `go run` so the CLI version always tracks the `github.com/onsi/ginkgo/v2` in your `go.mod`, no separately-installed binary to drift (→ `ginkgo:setup`).

```bash
go run github.com/onsi/ginkgo/v2/ginkgo \
  -r -p --randomize-all --randomize-suites \
  --fail-on-pending --fail-on-empty --keep-going \
  --cover --coverprofile=cover.profile --race --trace \
  --json-report=report.json --output-dir=.ginkgo-report \
  --timeout=TIMEOUT --poll-progress-after=Xs --poll-progress-interval=Ys
```

The rest: https://github.com/onsi/ginkgo/blob/HEAD/plugins/ginkgo/skills/ci/SKILL.md
