From 01b9840538b867061986ea406d1b79c91a701d17 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 31 Aug 2022 11:35:58 +0200 Subject: [PATCH] Use unique `CACHE_KEY_PREFIX`. --- __tests__/cache.test.ts | 8 ++++---- dist/cleanup/index.js | 2 +- dist/main/index.js | 2 +- src/cache.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/__tests__/cache.test.ts b/__tests__/cache.test.ts index ece4a95..074bdea 100644 --- a/__tests__/cache.test.ts +++ b/__tests__/cache.test.ts @@ -44,7 +44,7 @@ describe('dependency cache', () => { let spySaveState: jest.SpyInstance> beforeEach(() => { - workspace = mkdtempSync(join(tmpdir(), 'setup-java-cache-')) + workspace = mkdtempSync(join(tmpdir(), 'setup-graalvm-cache-')) switch (os.platform()) { case 'darwin': process.env['RUNNER_OS'] = 'macOS' @@ -337,7 +337,7 @@ function createStateForMissingBuildFile() { jest.spyOn(core, 'getState').mockImplementation(name => { switch (name) { case 'cache-primary-key': - return 'setup-java-cache-' + return 'setup-graalvm-cache-' default: return '' } @@ -351,9 +351,9 @@ function createStateForSuccessfulRestore() { jest.spyOn(core, 'getState').mockImplementation(name => { switch (name) { case 'cache-primary-key': - return 'setup-java-cache-primary-key' + return 'setup-graalvm-cache-primary-key' case 'cache-matched-key': - return 'setup-java-cache-matched-key' + return 'setup-graalvm-cache-matched-key' default: return '' } diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 8a43940..93365e3 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -63789,7 +63789,7 @@ const core = __importStar(__nccwpck_require__(2186)); const glob = __importStar(__nccwpck_require__(8090)); const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; const CACHE_MATCHED_KEY = 'cache-matched-key'; -const CACHE_KEY_PREFIX = 'setup-java'; +const CACHE_KEY_PREFIX = 'setup-graalvm'; const supportedPackageManager = [ { id: 'maven', diff --git a/dist/main/index.js b/dist/main/index.js index 7104dcb..9863dd6 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -66784,7 +66784,7 @@ const core = __importStar(__nccwpck_require__(2186)); const glob = __importStar(__nccwpck_require__(8090)); const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; const CACHE_MATCHED_KEY = 'cache-matched-key'; -const CACHE_KEY_PREFIX = 'setup-java'; +const CACHE_KEY_PREFIX = 'setup-graalvm'; const supportedPackageManager = [ { id: 'maven', diff --git a/src/cache.ts b/src/cache.ts index 66f5e72..82c0513 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -34,7 +34,7 @@ import * as glob from '@actions/glob' const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key' const CACHE_MATCHED_KEY = 'cache-matched-key' -const CACHE_KEY_PREFIX = 'setup-java' +const CACHE_KEY_PREFIX = 'setup-graalvm' interface PackageManager { id: 'maven' | 'gradle' | 'sbt'