mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
Improve dependencies cache usage
This commit is contained in:
parent
5b36705a13
commit
2d1721088f
6 changed files with 79 additions and 8 deletions
|
@ -92,6 +92,18 @@ describe('dependency cache', () => {
|
|||
expect(spyWarning).not.toBeCalled();
|
||||
expect(spyInfo).toBeCalledWith('maven cache is not found');
|
||||
});
|
||||
it('downloads cache with a custom key prefix', async () => {
|
||||
createFile(join(workspace, 'pom.xml'));
|
||||
|
||||
await restore('maven', 'YYYY-MM');
|
||||
expect(spyCacheRestore).toBeCalledWith(
|
||||
[expect.stringContaining('/.m2/repository')],
|
||||
expect.stringContaining('setup-java-YYYY-MM-macOS-maven-'),
|
||||
['setup-java-YYYY-MM-macOS-maven-', 'setup-java-YYYY-MM-macOS-', 'setup-java-YYYY-MM-']
|
||||
);
|
||||
expect(spyWarning).not.toBeCalled();
|
||||
expect(spyInfo).toBeCalledWith('maven cache is not found');
|
||||
});
|
||||
});
|
||||
describe('for gradle', () => {
|
||||
it('throws error if no build.gradle found', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue