Tests
Tests keeps the results of every job and run that reports JUnit XML: each test’s file, name, duration and outcome, for 30 days.
Reporting results
Section titled “Reporting results”In a run, pass --junit:
bareci run --junit junit.xml -- bun test --reporter=junit --reporter-outfile=junit.xmlIn a CI job, report the file after the tests:
bareci report test-results/junit.xmlFlows write JUnit too, so end-to-end results sit beside unit tests.
Flaky tests
Section titled “Flaky tests”A test is flaky when it both failed and passed on the same commit, or passed on retry. tests_flaky lists flaky tests with their counts and last failure message.
The Gate uses this: a failed check whose failing tests are all known to be flaky is re-run before it counts, and new flaky tests in a pull request are named in the verdict.
Slowest tests
Section titled “Slowest tests”tests_slowest lists the slowest files and tests, so an agent can see, for example, which few files take most of the suite’s time.
Sharding
Section titled “Sharding”bareci shard --total 4 --index 1 tests/**/*.test.tsshard prints this shard’s files, balanced by recorded duration: longest first onto the least-loaded shard. Files with no history count as the median. With bareci run --shards N, each machine has BARECI_SHARD_INDEX and BARECI_SHARD_TOTAL set.
See the Tests API.