mirror of
https://github.com/actions/setup-java.git
synced 2025-09-07 00:02:55 +08:00
doc update and check failure fix
This commit is contained in:
parent
7ae252c5c3
commit
a43d151116
10
README.md
10
README.md
@ -18,6 +18,16 @@ The `setup-java` action provides the following functionality for GitHub Actions
|
||||
|
||||
This action allows you to work with Java and Scala projects.
|
||||
|
||||
## Breaking changes in V5
|
||||
|
||||
- Upgrade to node 24 in [#888](https://github.com/actions/setup-java/pull/888)
|
||||
Make sure your runner is updated to this version or newer to use this release. v2.327.1 [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||
|
||||
For more detailed release notes with documntation updates and dependency upgrades, please track [release notes](https://github.com/actions/setup-java/releases/tag/v5.0.0)
|
||||
|
||||
|
||||
|
||||
|
||||
## V2 vs V1
|
||||
|
||||
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
|
||||
|
@ -150,9 +150,8 @@ describe('getAvailableVersions', () => {
|
||||
});
|
||||
mockPlatform(distribution, platform);
|
||||
|
||||
const availableVersion = await distribution['findPackageForDownload'](
|
||||
version
|
||||
);
|
||||
const availableVersion =
|
||||
await distribution['findPackageForDownload'](version);
|
||||
expect(availableVersion).not.toBeNull();
|
||||
expect(availableVersion.url).toBe(expectedLink);
|
||||
});
|
||||
@ -222,9 +221,8 @@ describe('getAvailableVersions', () => {
|
||||
|
||||
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
|
||||
|
||||
const availableVersion = await distribution['findPackageForDownload'](
|
||||
'17'
|
||||
);
|
||||
const availableVersion =
|
||||
await distribution['findPackageForDownload']('17');
|
||||
expect(availableVersion).not.toBeNull();
|
||||
expect(availableVersion.url).toBe(expectedLink);
|
||||
}
|
||||
|
@ -206,9 +206,8 @@ describe('getAvailableVersions', () => {
|
||||
});
|
||||
mockPlatform(distribution, platform);
|
||||
|
||||
const availableVersion = await distribution['findPackageForDownload'](
|
||||
jdkVersion
|
||||
);
|
||||
const availableVersion =
|
||||
await distribution['findPackageForDownload'](jdkVersion);
|
||||
expect(availableVersion).not.toBeNull();
|
||||
expect(availableVersion.url).toBe(expectedLink);
|
||||
}
|
||||
|
@ -76,9 +76,8 @@ describe('findPackageForDownload', () => {
|
||||
checkLatest: false
|
||||
});
|
||||
distribution['getAvailableVersions'] = async () => manifestData as any;
|
||||
const resolvedVersion = await distribution['findPackageForDownload'](
|
||||
input
|
||||
);
|
||||
const resolvedVersion =
|
||||
await distribution['findPackageForDownload'](input);
|
||||
const url = resolvedVersion.url;
|
||||
const options = {method: 'HEAD'};
|
||||
|
||||
|
@ -61,9 +61,8 @@ describe('getAvailableVersions', () => {
|
||||
|
||||
mockPlatform(distribution, 'linux');
|
||||
|
||||
const availableVersion = await distribution['findPackageForDownload'](
|
||||
version
|
||||
);
|
||||
const availableVersion =
|
||||
await distribution['findPackageForDownload'](version);
|
||||
expect(availableVersion).not.toBeNull();
|
||||
expect(availableVersion.url).toBe(
|
||||
'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz'
|
||||
@ -230,9 +229,8 @@ describe('getAvailableVersions', () => {
|
||||
});
|
||||
mockPlatform(distribution, platform);
|
||||
|
||||
const availableVersion = await distribution['findPackageForDownload'](
|
||||
normalizedVersion
|
||||
);
|
||||
const availableVersion =
|
||||
await distribution['findPackageForDownload'](normalizedVersion);
|
||||
expect(availableVersion).not.toBeNull();
|
||||
expect(availableVersion.url).toBe(expectedLink);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"description": "setup java action",
|
||||
"main": "dist/setup/index.js",
|
||||
"engines": {
|
||||
"engines": {
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -59,9 +59,8 @@ export async function createToolchainsSettings({
|
||||
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
||||
// otherwise use the home/.m2/ path
|
||||
await io.mkdirP(settingsDirectory);
|
||||
const originalToolchains = await readExistingToolchainsFile(
|
||||
settingsDirectory
|
||||
);
|
||||
const originalToolchains =
|
||||
await readExistingToolchainsFile(settingsDirectory);
|
||||
const updatedToolchains = generateToolchainDefinition(
|
||||
originalToolchains,
|
||||
jdkInfo.version,
|
||||
|
Loading…
x
Reference in New Issue
Block a user