Skip to content

Commit

Permalink
Use unique CACHE_KEY_PREFIX.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Aug 31, 2022
1 parent 3b96e2e commit 01b9840
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions __tests__/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 ''
}
Expand All @@ -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 ''
}
Expand Down
2 changes: 1 addition & 1 deletion dist/cleanup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 01b9840

Please sign in to comment.