Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable caching by default #321

Closed
wants to merge 10 commits into from
Closed

Conversation

dsame
Copy link
Contributor

@dsame dsame commented Jan 27, 2023

Description:
Change default value for cache input

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

 In order to avoid vague `default` value in many places
In order to hande empty 'cache' input
It is needed to enable cache
@panticmilos panticmilos self-requested a review February 2, 2023 14:13
@dsame dsame marked this pull request as ready for review February 8, 2023 08:04
@@ -13,3 +13,5 @@ export const supportedPackageManagers: SupportedPackageManagers = {
cacheFolderCommandList: ['go env GOMODCACHE', 'go env GOCACHE']
}
};

export const getCurrentPackageManager = (): string => 'default';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const getCurrentPackageManager = (): string => 'default';
export const getDefaultPackageManager = (): string => 'default';

@@ -14,7 +14,7 @@ inputs:
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
cache:
description: Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
default: false
required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
required: false
default: true
required: false

@@ -73,3 +78,16 @@ export function isCacheFeatureAvailable(): boolean {
);
return false;
}

export async function isCacheEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might split it into two functions:
isCacheEnabled and isCachePathsExists

@dsame
Copy link
Contributor Author

dsame commented Feb 24, 2023

The PR is aborted due to #332

@dsame dsame closed this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants