mirror of
https://github.com/actions/setup-java.git
synced 2026-07-30 09:10:01 +08:00
Add dependency cache path overrides (#1175)
* Add dependency cache path overrides Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c * Clarify supported dependency cache managers Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c * Fix custom cache path CI checks Align the custom cache save and restore key inputs and use the workflow hash to avoid a previously populated cache entry. Rebuild the distribution bundles. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c --------- Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c
This commit is contained in:
@@ -301,6 +301,10 @@ describe('setup action orchestration', () => {
|
||||
inputs.set('cache', 'maven');
|
||||
inputs.set('cache-dependency-path', '**/pom.xml');
|
||||
multilineInputs.set('java-version', ['21']);
|
||||
multilineInputs.set('cache-path', [
|
||||
'/custom/maven/repository',
|
||||
'!/custom/maven/repository/excluded'
|
||||
]);
|
||||
const setupJava = jest.fn(async () => ({
|
||||
version: '21.0.4+7',
|
||||
path: '/opt/java/21'
|
||||
@@ -312,7 +316,10 @@ describe('setup action orchestration', () => {
|
||||
expect(problemMatcher.configureProblemMatcher).toHaveBeenCalledWith(
|
||||
expect.stringMatching(/\.github[/\\]java\.json$/)
|
||||
);
|
||||
expect(cache.restore).toHaveBeenCalledWith('maven', '**/pom.xml');
|
||||
expect(cache.restore).toHaveBeenCalledWith('maven', '**/pom.xml', [
|
||||
'/custom/maven/repository',
|
||||
'!/custom/maven/repository/excluded'
|
||||
]);
|
||||
expect(
|
||||
(toolchains.configureToolchains as jest.Mock).mock.invocationCallOrder[0]
|
||||
).toBeLessThan(
|
||||
|
||||
Reference in New Issue
Block a user