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:
Bruno Borges
2026-07-29 14:43:55 -04:00
committed by GitHub
parent 9f43141311
commit 0b56831a10
10 changed files with 256 additions and 25 deletions
+8 -1
View File
@@ -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(