mirror of
https://github.com/actions/toolkit
synced 2025-05-11 09:32:58 +00:00
Adding support in cache package to check if Artifact Cache service is enabled or not (#1028)
* Added support to check if Artifact cache service is enabled or not.
* enablingForGHES
* added ACTIONS_CACHE_URL in fixtures
* Fix CI
* CI fix
* changed function name
* Function rename
* Updated release
* added test case
* Update RELEASES.md
* Lint errors
* lint
* linting
* lint
* update name to actions service
* Update packages/cache/src/internal/cacheUtils.ts
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
* review comments
* linting
* linting
* push to start CI
* Update RELEASES.md
* remove extra spaces
* reverting version update
* Revert "reverting version update"
This reverts commit af84eba61e
.
* Update RELEASES.md
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
This commit is contained in:
parent
39b9640642
commit
b463992869
7 changed files with 33 additions and 11 deletions
14
packages/cache/__tests__/cache.test.ts
vendored
Normal file
14
packages/cache/__tests__/cache.test.ts
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
import * as cache from '../src/cache'
|
||||
|
||||
test('isFeatureAvailable returns true if server url is set', () => {
|
||||
try {
|
||||
process.env['ACTIONS_CACHE_URL'] = 'http://cache.com'
|
||||
expect(cache.isFeatureAvailable()).toBe(true)
|
||||
} finally {
|
||||
delete process.env['ACTIONS_CACHE_URL']
|
||||
}
|
||||
})
|
||||
|
||||
test('isFeatureAvailable returns false if server url is not set', () => {
|
||||
expect(cache.isFeatureAvailable()).toBe(false)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue