Gradle build task improvements (#2164)

## Description

This fixes a few problems with the Gradle `build` task and subtasks.
1. Spotless was being run on `node_modules`, resulting in errors for
out-of-source files. This is now disabled.
2. All tests were running from the `build` task, resulting in unexpected
windows popping up. Now only headless tests are run.
3. Headless tests were updated to run from the same root directory as
the other tests.

## Meta

Merge checklist:
- [X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [X] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
This commit is contained in:
Alan Everett
2025-11-01 17:42:30 -04:00
committed by GitHub
parent 36b437323f
commit 5df9137256
3 changed files with 12 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ tasks.register('testHeadless', Test) {
showStandardStreams = true
}
exclude '**/*BenchmarkTest*'
workingDir = "../"
workingDir = new File("${rootDir}")
}
jacoco {
@@ -96,3 +96,10 @@ jacocoTestReport {
}))
}
}
// Only run headless tests from the build task
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(build)) {
test.enabled = false
}
}