Add unit tests

This commit is contained in:
Sergey Dolin 2023-08-18 09:01:34 +02:00
parent 6f72b31c94
commit deaf43692d
7 changed files with 114 additions and 78 deletions

View file

@ -7,11 +7,4 @@ export enum StableReleaseAlias {
export const isSelfHosted = (): boolean =>
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
process.env['AGENT_ISSELFHOSTED'] === '1';
export const getCacheInput = (): boolean => {
// for self-hosted environment turn off cache by default
if (isSelfHosted() && core.getInput('cache') === '') return false;
return core.getBooleanInput('cache');
};
process.env['AGENT_ISSELFHOSTED'] !== '0';