forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 1
Fix gradle test gap 7 #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xiongemi
wants to merge
104
commits into
main
Choose a base branch
from
fix-gradle-test-gap-7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
2d23b5a
add nx
xiongemi a7c145c
add nx
xiongemi aa5c746
chore(repo): apply nx-cloud
lourw d998912
chore(repo): remove post install
lourw 0a6017e
add .env file with NX_BATCH_MODE
xiongemi 20b8ce6
chore(repo): bust cache
lourw cc35f90
chore(repo): switch to staging
lourw b731aa4
chore(repo): bust cache
lourw 071de19
chore(repo): bust cache
lourw 3651091
upgrade pr version to 0.0.0-pr-30913-b417cd3 (+2 squashed commits)
xiongemi 9e441cb
chore(repo): change run-many to use assemble, test-ci
lourw b34b81c
Use check-ci
lourw 22a8b56
Apply suggestions from code review
lourw e9f719e
upgrade pr version to 0.0.0-pr-30913-75a64ba (+2 squashed commits)
xiongemi 4cdca45
upgrade pr version to 0.0.0-pr-30913-75a64ba (+2 squashed commits)
xiongemi fdd5fcb
change to stream output
xiongemi 03b5e0f
upgrade pr version to 0.0.0-pr-30913-89a46d1
xiongemi 7bc1bca
change pr version to 0.0.0-pr-30913-da2b0d3
xiongemi c3dd66b
add atomized false for spring-boot-autoconfigure
xiongemi cb864e6
add dependsOn
xiongemi ef7c44e
add atomized false
xiongemi 74c4b41
change atomized false for spring-boot-maven-plugin
xiongemi 2dfe573
bust cache
xiongemi c41f5ee
change antoraNpmInstall depends on generateAntoraPlaybook
xiongemi 75c5d1d
add dependsOn
xiongemi 18c2b7a
upgrade pr version to .0.0-pr-30913-4005921
xiongemi 5ea5244
remove all nxProjectReport atomized false
xiongemi 7001eab
add atomized false to gradle-plugin
xiongemi 5526a4c
upgrade pr version to 0.0.0-pr-30913-f9ca713`
xiongemi 7ffbfd1
add dependsOn from test
xiongemi e5f464e
upgrade pr version 0.0.0-pr-30913-f38a495
xiongemi 020d01f
bust cache
xiongemi 247f3df
disable antora
xiongemi c6df43e
disable test for spring-boot and bust cache
xiongemi d447871
bust cache
xiongemi 67ff085
bust cache
xiongemi aaec175
bust cache
xiongemi 1647d9b
upgrade pr version to 0.0.0-pr-30913-8852111
xiongemi ee4890d
bust cache
xiongemi 60b1a7c
add maxParallelForks for spring-boot-maven-plugin
xiongemi 5336645
add assignment rule
xiongemi df78c57
bust cache
xiongemi e341317
disable antora in spring-boot-maven-plugin
xiongemi 8b864a4
bust cache
xiongemi dfee9ec
upgrade pr version to 0.0.0-pr-31313-387cdca
xiongemi 5ac37ba
upgrade pr version to 0.0.0-pr-31313-1d47572
xiongemi daedd7b
upgrade pr version to 0.0.0-pr-31313-9688d2f
xiongemi d9bba2e
run replace batch runner
xiongemi aea0d74
separate connection for test
xiongemi 3a59f9c
remove withCancellationToken
xiongemi e26e1f8
move cancel at test start event
xiongemi 22b5c2a
add no-daemon
xiongemi ad2915e
track running tasks
xiongemi 2054f14
add --no-rebuild and disable test for spring-boot-autoconfigure
xiongemi 75e807d
--no-build-cache
xiongemi 8beead6
comment out cancellationTokenSource
xiongemi 18aa4ed
add activeDescriptors
xiongemi fe33c40
no-build-cache
xiongemi 79702c1
--no-configure-on-demand
xiongemi 076823c
rerun tasks
xiongemi fa04705
turn on NX_CLOUD_USE_BATCHING
xiongemi 21e82af
Update .github/actions/build/action.yml
lourw 98c7c3d
Apply suggestions from code review
lourw 5355791
Update .github/actions/build/action.yml
lourw 129a2a3
Update .github/workflows/build-pull-request.yml
lourw e0d6c6e
change event time
xiongemi 526cdcb
remove max worker and bust cache
xiongemi 4c729e4
add max worker back in
xiongemi 232ac8b
bust cache
xiongemi 0143e10
disable antora and bust cache
xiongemi 88711d1
reduce max workers to 0.5
xiongemi 49371b8
make build and test run at same time
xiongemi 9191bb5
build and test run in sequence and bust cache
xiongemi a0d77c2
bust cache
xiongemi 6f52c7d
bust cache
xiongemi 1f05e48
add flag to junit parallelism
xiongemi 6e0f3b0
add cancellation token
xiongemi 7b8807a
fix dependsOn and log delta
xiongemi bf55bce
checkToStopRun
xiongemi 26c082f
add log NX_CLOUD_VERBOSE_LOGGING=true
xiongemi 5caeda7
move complete tasks
xiongemi 75b575c
cancel token
xiongemi 2af683d
kill run when complete task finished
xiongemi 1f343d2
try build cache
xiongemi 6496fc0
add back check runinng tasks
xiongemi 3f6d8c7
remove cancellation token
xiongemi 6f8a000
upgrade pr version to 0.0.0-pr-31313-ab5426c
xiongemi a5d3390
no exclue for test
xiongemi fb3299e
add excludeTestTasks
xiongemi ca0e852
upgrade pr version to 0.0.0-pr-31313-574e68d
xiongemi b5d413a
set ci success to true if test passed
xiongemi 93b7b19
disable atomized for spring-boot-autoconfigure
xiongemi 0de3855
bust cache
xiongemi e6de644
add NX_CLOUD_VERBOSE_LOGGING
xiongemi 4f9d3a1
diasble atomized for spring-boot-autoconfigure
xiongemi c154b91
bust cache
xiongemi 736135b
Update nx.json
lourw 376edbc
Apply suggestions from code review
lourw b99ba70
upgrade pr version to 0.0.0-pr-31313-3e61ace
xiongemi 6ff3380
remove NX_CLOUD_USE_BATCHING=true
xiongemi 9ee95e4
change to build-ci with parallel 32 and bust cache
xiongemi b52d391
try to turn on atomizer for all projects
xiongemi 9692b12
disable atomized for spring-boot-gradle-plugin and bust cache
xiongemi d793b03
bust cache
xiongemi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references | ||
.specstory/** |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NX_BATCH_MODE=true | ||
NX_VERBOSE_LOGGING=true | ||
NX_CLOUD_VERBOSE_LOGGING=true | ||
NX_TUI=false | ||
CI=true | ||
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
"use strict"; | ||
// This file should be committed to your repository! It wraps Nx and ensures | ||
// that your local installation matches nx.json. | ||
// See: https://nx.dev/recipes/installation/install-non-javascript for more info. | ||
|
||
|
||
|
||
|
||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const cp = require('child_process'); | ||
const installationPath = path.join(__dirname, 'installation', 'package.json'); | ||
function matchesCurrentNxInstall(currentInstallation, nxJsonInstallation) { | ||
if (!currentInstallation.devDependencies || | ||
!Object.keys(currentInstallation.devDependencies).length) { | ||
return false; | ||
} | ||
try { | ||
if (currentInstallation.devDependencies['nx'] !== | ||
nxJsonInstallation.version || | ||
require(path.join(path.dirname(installationPath), 'node_modules', 'nx', 'package.json')).version !== nxJsonInstallation.version) { | ||
return false; | ||
} | ||
for (const [plugin, desiredVersion] of Object.entries(nxJsonInstallation.plugins || {})) { | ||
if (currentInstallation.devDependencies[plugin] !== desiredVersion) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
catch { | ||
return false; | ||
} | ||
} | ||
function ensureDir(p) { | ||
if (!fs.existsSync(p)) { | ||
fs.mkdirSync(p, { recursive: true }); | ||
} | ||
} | ||
function getCurrentInstallation() { | ||
try { | ||
return require(installationPath); | ||
} | ||
catch { | ||
return { | ||
name: 'nx-installation', | ||
version: '0.0.0', | ||
devDependencies: {}, | ||
}; | ||
} | ||
} | ||
function performInstallation(currentInstallation, nxJson) { | ||
fs.writeFileSync(installationPath, JSON.stringify({ | ||
name: 'nx-installation', | ||
devDependencies: { | ||
nx: nxJson.installation.version, | ||
...nxJson.installation.plugins, | ||
}, | ||
})); | ||
try { | ||
cp.execSync('npm i', { | ||
cwd: path.dirname(installationPath), | ||
stdio: 'inherit', | ||
windowsHide: false, | ||
}); | ||
} | ||
catch (e) { | ||
// revert possible changes to the current installation | ||
fs.writeFileSync(installationPath, JSON.stringify(currentInstallation)); | ||
// rethrow | ||
throw e; | ||
} | ||
} | ||
function ensureUpToDateInstallation() { | ||
const nxJsonPath = path.join(__dirname, '..', 'nx.json'); | ||
let nxJson; | ||
try { | ||
nxJson = require(nxJsonPath); | ||
if (!nxJson.installation) { | ||
console.error('[NX]: The "installation" entry in the "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript'); | ||
process.exit(1); | ||
} | ||
} | ||
catch { | ||
console.error('[NX]: The "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript'); | ||
process.exit(1); | ||
} | ||
try { | ||
ensureDir(path.join(__dirname, 'installation')); | ||
const currentInstallation = getCurrentInstallation(); | ||
if (!matchesCurrentNxInstall(currentInstallation, nxJson.installation)) { | ||
performInstallation(currentInstallation, nxJson); | ||
} | ||
} | ||
catch (e) { | ||
const messageLines = [ | ||
'[NX]: Nx wrapper failed to synchronize installation.', | ||
]; | ||
if (e instanceof Error) { | ||
messageLines.push(''); | ||
messageLines.push(e.message); | ||
messageLines.push(e.stack); | ||
} | ||
else { | ||
messageLines.push(e.toString()); | ||
} | ||
console.error(messageLines.join('\n')); | ||
process.exit(1); | ||
} | ||
} | ||
if (!process.env.NX_WRAPPER_SKIP_INSTALL) { | ||
ensureUpToDateInstallation(); | ||
} | ||
|
||
require('./installation/node_modules/nx/bin/nx'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
launch-templates: | ||
linux-extra-large-plus-jvm: | ||
env: | ||
NX_CLOUD_FORCE_USE_EXECUTE_TASKS_V3: "false" | ||
DOCKER_HOST: "" | ||
SERVICES_HOST: "" | ||
LANG: C.UTF-8 | ||
resource-class: 'docker_linux_amd64/extra_large+' | ||
image: 'ubuntu22.04-node20.11-v10' | ||
init-steps: | ||
- name: java version | ||
script: java -version | ||
|
||
- name: Checkout | ||
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml' | ||
|
||
- name: Setup Java 21 | ||
script: | | ||
sudo apt update | ||
sudo apt install -y openjdk-21-jdk | ||
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java | ||
java -version | ||
- name: Setup gradle | ||
script: ./gradlew wrapper && ./gradlew --stop && ./gradlew clean | ||
|
||
- name: Restore Node Modules Cache | ||
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml' | ||
inputs: | ||
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml' | ||
paths: 'node_modules' | ||
base-branch: 'main' | ||
- name: Restore Browser Binary Cache | ||
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml' | ||
inputs: | ||
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml|"browsers"' | ||
paths: | | ||
'../.cache/Cypress' | ||
base-branch: 'main' | ||
- name: Install Node Modules | ||
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml' | ||
- name: postinstall | ||
script: npm run postinstall |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
distribute-on: | ||
default: 5 linux-extra-large-plus-jvm | ||
|
||
assignment-rules: | ||
- targets: | ||
- 'ciIntTest*' | ||
run-on: | ||
- agent: linux-extra-large-plus-jvm | ||
parallelism: 1 | ||
|
||
- projects: | ||
- "*" | ||
run-on: | ||
- agent: linux-extra-large-plus-jvm |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.