• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DanielXMoore / Civet / 23855723136
95%

Build:
DEFAULT BRANCH: main
Ran 01 Apr 2026 03:10PM UTC
Jobs 1
Files 42
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Apr 2026 03:09PM UTC coverage: 91.513% (+0.04%) from 91.475%
23855723136

push

github

web-flow
perf: speed up build and test times (#1879)

* Speed up build and test times

Disk-cache hera and civet compilations, make c8 coverage opt-in,
enable parallel mocha by default, and add CIVET_NO_BROWSER flag.

## What changed

**Compilation caches** (`.cache/hera/`, `.cache/civet/`)
The two slow steps at mocha startup were:
- `parser.hera` compiled by hera on every run (~0.5s)
- 33+ source `.civet` files compiled by civet v0.9.4 on every run (~4.5s)

Both are now cached to disk, keyed by file content + compiler version.
Cache files are written atomically (tmp + rename) so parallel workers
don't corrupt each other. `.cache/` is already gitignored.

Two new files implement the caching:
- `build/hera-register.js` + `build/hera-esm-hook.mjs` — CJS/ESM hooks
  for `.hera` files that serve compiled output from cache
- `build/civet-cache-register.js` + `build/civet-esm-hook.mjs` — same
  for `.civet` files; registered after the civet register so it runs
  first (LIFO) and short-circuits old civet's ESM hook on cache hits

**Optional coverage** (`CIVET_COVERAGE=1`)
`c8` added ~14s of overhead on every `yarn test`. Coverage now only
runs when `CIVET_COVERAGE=1` is set. A new `test:coverage` script sets
it, and `prepublishOnly` now calls `test:coverage` instead of `test`.

**Parallel mocha by default**
With per-worker startup now ~0.2s (down from ~7s), `--parallel` is
beneficial. Worker count defaults to `os.cpus().length`; set
`CIVET_THREADS=N` to override or `CIVET_THREADS=0` to disable.

**Skip browser/terser in dev** (`CIVET_NO_BROWSER=1`)
The terser minification step for `civet.dev` can be skipped when not
working on the docs site.

## Results

| | Before | Cold cache | Warm cache |
|---|---|---|---|
| `yarn test` | ~28s | ~11s | ~4s |
| `yarn test:coverage` | ~28s | ~22s | ~13s |
| `yarn build` | ~6.5s | ~6s | ~6s |
| `CIVET_NO_BROWSER=1 yarn build` | ~6.5s | ~5.5s | ~5.5s |

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

3920 of 4266 branches covered (91.89%)

Branch coverage included in aggregate %.

19445 of 21266 relevant lines covered (91.44%)

17710.21 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
85.24
0.0% source/main.civet
Jobs
ID Job ID Ran Files Coverage
1 23855723136.1 01 Apr 2026 03:10PM UTC 42
91.51
GitHub Action Run
Source Files on build 23855723136
  • Tree
  • List 42
  • Changed 18
  • Source Changed 0
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #23855723136
  • 67d62af1 on github
  • Prev Build on main (#23855577948)
  • Next Build on main (#23913590751)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc