Skip to content

Commit ada62bb

Browse files
authored
Merge pull request #119 from DeLaGuardo/upgrade-dependencies
Do not attempt to write cache again on known cache hit
2 parents cc67f83 + 236bb0a commit ada62bb

File tree

11 files changed

+801
-3939
lines changed

11 files changed

+801
-3939
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
java-version: '8'
4747

4848
- name: Install clojure tools
49-
uses: DeLaGuardo/setup-clojure@13.0
49+
uses: DeLaGuardo/setup-clojure@13.2
5050
with:
5151
# Install just one or all simultaneously
5252
# The value must indicate a particular version of the tool, or use 'latest'

__tests__/entrypoint.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as _core from '@actions/core'
2+
import * as _cache from '@actions/cache'
23
import * as _lein from '../src/leiningen'
34
import * as _boot from '../src/boot'
45
import * as _cli from '../src/cli'
@@ -13,6 +14,9 @@ import {main} from '../src/entrypoint'
1314
jest.mock('@actions/core')
1415
const core: jest.Mocked<typeof _core> = _core as never
1516

17+
jest.mock('@actions/cache')
18+
const cache: jest.Mocked<typeof _cache> = _cache as never
19+
1620
jest.mock('../src/leiningen')
1721
const lein: jest.Mocked<typeof _lein> = _lein as never
1822

@@ -48,6 +52,19 @@ describe('setup-clojure', () => {
4852
inputs = {}
4953
core.getInput.mockImplementation(key => inputs[key])
5054
core.getState.mockImplementation(() => 'main')
55+
cache.restoreCache.mockImplementation(
56+
async (
57+
_paths,
58+
_primaryKey,
59+
_restoreKeys,
60+
_options,
61+
_enableCrossOsArchive
62+
) => Promise.resolve('')
63+
)
64+
cache.saveCache.mockImplementation(
65+
async (_paths, _key, _enableCrossOsArchive, _options) =>
66+
Promise.resolve(0)
67+
)
5168
})
5269

5370
it('sets up Leiningen', async () => {

dist/index.js

Lines changed: 212 additions & 3309 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)