Skip to content

Commit 5ce8355

Browse files
committed
add --fail-on-empty to recommended CI flags in docs
1 parent 3ffbf8b commit 5ce8355

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3696,7 +3696,7 @@ When running in CI you must make sure that the version of the `ginkgo` CLI you a
36963696
Once you have `ginkgo` running on CI, you'll want to pick and choose the optimal set of flags for your test runs. We recommend the following set of flags when running in a continuous integration environment:
36973697

36983698
```bash
3699-
go run github.com/onsi/ginkgo/v2/ginkgo -r --procs=N --compilers=N --randomize-all --randomize-suites --fail-on-pending --keep-going --cover --coverprofile=cover.profile --race --trace --json-report=report.json --timeout=TIMEOUT --poll-progress-after=Xs --poll-progress-interval=Ys
3699+
go run github.com/onsi/ginkgo/v2/ginkgo -r --procs=N --compilers=N --randomize-all --randomize-suites --fail-on-pending --fail-on-empty --keep-going --cover --coverprofile=cover.profile --race --trace --json-report=report.json --timeout=TIMEOUT --poll-progress-after=Xs --poll-progress-interval=Ys
37003700
```
37013701

37023702
Here's why:
@@ -3705,6 +3705,8 @@ Here's why:
37053705
- `-procs=N` will run each suite in parallel. This can substantially speed up suites and you should experiment with different values of `N`. Note that it is not recommended that you run specs in parallel with `-p` on CI. Some CI services run on shared machines that will report (e.g.) `32` cores but will not actually give an individual account access to all those compute resources!
37063706
- `--compilers=N` will control how many cores to use to compile suites in parallel. You may need to set this explicitly to avoid accidentally trying to use all `32` cores on that CI machine!
37073707
- `--randomize-all` and `--randomize-suites` will randomize all specs and randomize the order in which suites run. This will help you suss out spec pollution early!
3708+
- `--fail-on-pending` will fail the suite if it contains any pending specs. These are generally only used while developing the suite and should not be committed.
3709+
- `--fail-on-empty` will fail the suite if it contains no specs or if all specs have been filtered out. This can help you ensure that the CLI filters have not filtered out all specs (which typically means the filters are malformed).
37083710
- `--keep-going` will instruct Ginkgo to keep running suites, even after a suite fails. This can help you get a set of all failures instead of stopping after the first failed suite.
37093711
- `--cover` and `--coverprofile=cover.profile` will compute coverage scores and generate a single coverage file for all your specs.
37103712
- `--race` will run the race detector.

0 commit comments

Comments
 (0)