Repository navigation
chore: run tests by default in Maven builds - #1228
Open
GOODBOY008 wants to merge 1 commit into
Open
GOODBOY008 wants to merge 1 commit into
GOODBOY008 wants to merge 1 commit into
Conversation
Drop the maven.test.skip=true POM default inherited from EasyExcel so the build follows the standard Maven/Apache convention: mvn install compiles and runs tests, and -DskipTests skips execution only (before, -DskipTests was a no-op because maven.test.skip took precedence). The Apache parent POM sets no test-skip defaults and sibling projects (POI, Commons, Maven core) all run tests by default. This also fixes misleading docs: the contributor guide and release vote templates referenced -DskipTests with inverted semantics. CI keeps its current shape: the test step runs the same suite it ran via the explicit -Dmaven.test.skip=false flag, and the follow-up full reactor install step gets -DskipTests so the suite does not run twice (the failure mode that got apache#390 reverted by apache#392 in 2025). The full suite is ~2.5 min per JDK job on current runners, so this no longer carries the CI cost it did then. Signed-off-by: gongzhongqiang <gongzhongqiang@apache.org>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
<maven.test.skip>true</maven.test.skip>has been a POM default ever since the EasyExcel import (f7d8ceb). This inverts standard Maven behavior and made-DskipTestsa no-op (maven.test.skiptakes precedence in both the compiler and Surefire):mvn clean installmvn clean install -DskipTestsmvn clean install -Dmaven.test.skip=falseThis deviates from ASF practice:
testphase runs.maven.test.skipas a last-resort CLI escape hatch ("If you absolutely must"), not a POM default.-DskipTests"to skip unit tests" and the release vote templates asked voters to build with-DskipTests, although the ASF Release Policy requires voters to "compile as provided, and test the result".Why now (history: #390 → #392)
#390 flipped this default once (2025-06) and #392 reverted it the same day because CI took 2–5 hours. Both causes are gone:
installCI step back then re-ran the whole suite a second time (itscore/**scope limit did not exclude the large-file tests —large/lives undercore/). This PR keeps that step on-DskipTests, so the suite runs exactly once per JDK job, same as today.LargeDataTestincluding the 74 MBlarge07.xlsxnow runs in 89 s. Multi-hour CI durations these days are runner queueing, not test execution (one 236-min run broke down as 232 min queued / 2–3 min executing).Changes
pom.xml: drop themaven.test.skipdefault..github/workflows/ci.yml: the test step no longer passes-Dmaven.test.skip=false(tests run by default); the follow-up full-reactorinstallstep now passes-DskipTestsso the suite does not run twice..github/workflows/nightly.yml,.github/workflows/fuzz-tests.yml: drop the now-redundant flag..github/copilot-instructions.md: update the build/test commands.mvn clean installis documented as the primary build command; the release deploy command and vote templates no longer skip tests.Verification
./mvnw clean package -pl fesod-common,fesod-shaded,fesod-sheet(no flags): 1085 tests run, 0 failures, BUILD SUCCESS in 1:16 (JDK 17) — tests now run by default../mvnw clean package -pl fesod-common -DskipTests: "Tests are skipped." — standard flag semantics restored../mvnw spotless:check: clean.Note for reviewers: #1227 moves
.github/copilot-instructions.mdto the root asAGENTS.md; that PR will need a trivial rebase after this one merges.