Skip to content

Commit bff4ce4

Browse files
fix(ci): package reactor dependencies before server tests (#1585)
1 parent 8f787c6 commit bff4ce4

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Use `bun run check:affected` for in-session feedback; it is not the pre-push gat
5353
| `bun run verify` | Complete local CI mirror for checks that need no live service, image build, or hosted credential |
5454
| `bun run test:webapp` | Vitest |
5555
| `bun run test:agents` | Agent runtime and precompute specs, on Bun |
56-
| `cd server && ./mvnw test` | Server unit tests — see `server/AGENTS.md` for all four tiers |
56+
| `bun run test:server:unit` | Server unit tests — see `server/AGENTS.md` for all four tiers |
5757

5858
Naming: `format` applies, `format:check` verifies read-only for CI, `lint` lints, `check` is the
5959
comprehensive local quality gate. A `:webapp`, `:server` or `:agents` suffix scopes any of them; `:java`

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
"check:webapp:fix": "bun run --filter webapp check:fix",
2626
"typecheck:webapp": "bun run --filter webapp typecheck",
2727
"test:webapp": "bun run --filter webapp test",
28-
"test:server:unit": "cd server && ./mvnw -pl application -am test -Dsurefire.includedGroups=unit -DskipCoverage=false --batch-mode",
29-
"test:server:architecture": "cd server && ./mvnw -pl application -am test -Parchitecture-tests --batch-mode",
30-
"test:server:verification": "cd server && ./mvnw -pl application -am test -Parchitecture-tests -Dsurefire.includedGroups=unit,architecture -DskipCoverage=false --batch-mode",
31-
"test:server:integration": "cd server && ./mvnw -pl application -am test -Dsurefire.includedGroups=integration -Dparallel=none --batch-mode",
28+
"test:server:unit": "cd server && ./mvnw -pl application -am package -Dsurefire.includedGroups=unit -DskipCoverage=false --batch-mode",
29+
"test:server:architecture": "cd server && ./mvnw -pl application -am package -Parchitecture-tests --batch-mode",
30+
"test:server:verification": "cd server && ./mvnw -pl application -am package -Parchitecture-tests -Dsurefire.includedGroups=unit,architecture -DskipCoverage=false --batch-mode",
31+
"test:server:integration": "cd server && ./mvnw -pl application -am package -Dsurefire.includedGroups=integration -Dparallel=none --batch-mode",
3232
"test:server:mutation": "bun scripts/run-security-mutations.ts",
3333
"summarize:test-results": "bun scripts/summarize-test-results.ts",
3434
"build:webapp": "bun run --filter webapp build",

server/AGENTS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ the Postgres container. For plain terminals: `bun run dev:server` and `bun run d
2929
Each of these can leave you with the wrong result.
3030

3131
- **Use the reactor.** `server/generated-clients` owns every GraphQL and Outline generator and
32-
`server/application` consumes its JAR. From `server/`, `./mvnw test` runs the default unit suite;
33-
use it after a fresh checkout or generated-client input change. For the repeated application-edit
34-
loop, use `./mvnw -f application/pom.xml test` (and `-Dtest=ClassName` to focus a test) so Maven does
35-
not restore the generated module and invalidate application incremental compilation.
32+
`server/application` consumes its JAR. From the repository root, use
33+
`bun run test:server:unit` after a fresh checkout or generated-client input change. For the repeated
34+
application-edit loop, use `./mvnw -f application/pom.xml test` from `server/` (and
35+
`-Dtest=ClassName` to focus a test) so Maven does not restore the generated module and invalidate
36+
application incremental compilation.
3637
- **`-Dgroups=architecture` silently runs the unit suite instead.** `pom.xml` sets Surefire's `<groups>`
3738
to `${surefire.includedGroups}`, and a POM element beats the `-Dgroups` user property — so the flag is
38-
discarded and the default (`unit`) runs. The tag is selected by profile, never by `-Dgroups`:
39-
`./mvnw test -Parchitecture-tests`. CI is unaffected; it passes `-Dsurefire.includedGroups`,
40-
which is the property the POM actually reads.
39+
discarded and the default (`unit`) runs. Use `bun run test:server:architecture`; CI passes the
40+
`${surefire.includedGroups}` property that the POM reads.
4141
- **`clean` does not guarantee a cold build.** It removes workspace outputs, but Maven Build Cache can
4242
restore them. The repository enables the cache for `generated-clients`; Maven logs `Found cached
4343
build` on a hit. Pass `-Dmaven.build.cache.enabled=false` when measuring a cold build. Schema,
@@ -80,16 +80,16 @@ excluded. Every new package needs a `package-info.java` containing
8080
`NullAway` suppressions. Use `@Nullable` only for genuine absence and place it on the precise type:
8181
`List<@Nullable String>` permits null elements; `String @Nullable []` permits a null array reference.
8282
Fix violations at the contract or implementation boundary. In tests, refine a nullable result once
83-
before using it rather than adding duplicate assertions. Run `./mvnw test` after changing a
84-
nullness contract.
83+
before using it rather than adding duplicate assertions. Run `bun run test:server:unit` after changing
84+
a nullness contract.
8585

8686
## Test tiers
8787

8888
| Tag | Runs | Command |
8989
|---|---|---|
90-
| `unit` | no Spring context | `./mvnw test` |
91-
| `architecture` | ArchUnit + Modulith verification | `./mvnw test -Parchitecture-tests` |
92-
| `integration` | unit tests, then full context + Testcontainers | `./mvnw verify` |
90+
| `unit` | no Spring context | `bun run test:server:unit` |
91+
| `architecture` | ArchUnit + Modulith verification | `bun run test:server:architecture` |
92+
| `integration` | full context + Testcontainers | `bun run test:server:integration` |
9393
| `live` | real GitHub API | `./mvnw test -Plive-tests` |
9494

9595
Live tests need GitHub App credentials in `application-live-local.yml` (gitignored); the Maven profile

0 commit comments

Comments
 (0)