Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ Checks that only fail once tests are compiled, or after a `clean`, slip straight
Prone rules that fire on test fixtures, formatter tasks that were up to date, dependency upgrades
that break test code but not main.

The gate is a full build, which is also what CI runs on every push and pull request:
The gate is `./gradlew build`, the same task CI runs. Let Gradle decide how much of it to re-run:
a change that reaches nothing finishes in seconds, so there is no need to judge by hand what a diff
can affect. Add `clean` only to rule out stale output.

```bash
./gradlew clean build # several minutes, must be 0 failures
./gradlew build # minutes when it has work to do, seconds when it does not; 0 failures
```

A green local build is not a green CI. Pull requests against `master` also run an OpenRewrite check
that `.github/CONTRIBUTING.md` documents, and a wrapper validation. Pushes are weaker than they
look: the `branches: ['*']` filter in `test.yml` does not match `/`, so pushing a branch named
`docs/foo` triggers no build until a pull request exists.

`verifyPublishedPomDependencies` (in `testng/testng-build.gradle.kts`, wired into `check`) pins the
exact dependency set of the published pom, versions ignored. When it fails, either the change is
wrong or the expected list needs updating — decide which, do not just update the list.
Expand Down
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This needs the `java@<N>` alias to point at an installed version; `mise where` f

## Long-running commands

`./gradlew clean build` takes several minutes — well over the default `Bash` timeout. Pass an
explicit one:
`./gradlew build` takes several minutes whenever it has real work to do — well over the default
`Bash` timeout. Pass an explicit one:

```text
timeout: 900000
Expand All @@ -29,14 +29,14 @@ without it the pipeline reports grep's status, so a failed build still exits 0:

```bash
set -o pipefail
./gradlew --console=plain clean build 2>&1 | grep -E "^BUILD (SUCCESSFUL|FAILED)|[1-9][0-9]* failed"
./gradlew --console=plain build 2>&1 | grep -E "^BUILD (SUCCESSFUL|FAILED)|[1-9][0-9]* failed"
```

For a failure, extract the useful part instead of scrolling:

```bash
set -o pipefail
./gradlew --console=plain clean build 2>&1 | grep -A15 "What went wrong"
./gradlew --console=plain build 2>&1 | grep -A15 "What went wrong"
```

Gradle names the HTML report on failure, but locating the failing test is quicker from the result
Expand Down
Loading