feat(cache): change key to match actions/cache documentation

Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
This commit is contained in:
MOREL Matthieu 2021-08-26 15:31:04 +02:00
parent 3bc31aaf88
commit 0f6dbb0a05
7 changed files with 39 additions and 25 deletions

View file

@ -90,7 +90,9 @@ describe('dependency cache', () => {
await restore('maven');
expect(spyCacheRestore).toBeCalled();
expect(spyWarning).not.toBeCalled();
expect(spyInfo).toBeCalledWith('maven cache is not found');
expect(spyInfo).toBeCalledWith(
`Cache not found for input keys: ${process.env['RUNNER_OS']}-setup-java-maven-5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456, ${process.env['RUNNER_OS']}-setup-java-maven-, ${process.env['RUNNER_OS']}-setup-java-`
);
});
});
describe('for gradle', () => {
@ -107,7 +109,9 @@ describe('dependency cache', () => {
await restore('gradle');
expect(spyCacheRestore).toBeCalled();
expect(spyWarning).not.toBeCalled();
expect(spyInfo).toBeCalledWith('gradle cache is not found');
expect(spyInfo).toBeCalledWith(
`Cache not found for input keys: ${process.env['RUNNER_OS']}-setup-java-gradle-5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456, ${process.env['RUNNER_OS']}-setup-java-gradle-, ${process.env['RUNNER_OS']}-setup-java-`
);
});
it('downloads cache based on build.gradle.kts', async () => {
createFile(join(workspace, 'build.gradle.kts'));
@ -115,7 +119,9 @@ describe('dependency cache', () => {
await restore('gradle');
expect(spyCacheRestore).toBeCalled();
expect(spyWarning).not.toBeCalled();
expect(spyInfo).toBeCalledWith('gradle cache is not found');
expect(spyInfo).toBeCalledWith(
`Cache not found for input keys: ${process.env['RUNNER_OS']}-setup-java-gradle-5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456, ${process.env['RUNNER_OS']}-setup-java-gradle-, ${process.env['RUNNER_OS']}-setup-java-`
);
});
});
});