Use unique CACHE_KEY_PREFIX.

This commit is contained in:
Fabio Niephaus 2022-08-31 11:35:58 +02:00
parent 3b96e2ea68
commit 01b9840538
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
4 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ describe('dependency cache', () => {
let spySaveState: jest.SpyInstance<void, Parameters<typeof core.saveState>>
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 ''
}

2
dist/cleanup/index.js generated vendored
View File

@ -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',

2
dist/main/index.js generated vendored
View File

@ -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',

View File

@ -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'