Merged
Conversation
…orkspace root (#1128) * ehnace cache dependency path handling * logic update * npm run format-check * update cacheDependencies tests to cover resolved paths and copy edge cases * check failure fix * depricate-windows-2019 * refactored the code * Check failure fix
|
Review these changes at https://app.gitnotebooks.com/Stars1233/setup-python/pull/16 |
Reviewer's GuideThis PR exports the cacheDependencies function and enriches its cache-dependency-path handling to support files outside the workspace by resolving and copying them into the workspace for proper caching; it also updates documentation and workflows accordingly and adds comprehensive unit tests. Sequence diagram for enhanced cache-dependency-path handling in cacheDependenciessequenceDiagram
participant Workflow
participant cacheDependencies
participant core
participant fs
participant process
participant getCacheDistributor
participant cacheDistributor
Workflow->>cacheDependencies: Call with cache, pythonVersion
cacheDependencies->>core: getInput('cache-dependency-path')
cacheDependencies->>process: Get GITHUB_ACTION_PATH, GITHUB_WORKSPACE
alt cache-dependency-path provided
cacheDependencies->>fs: Check if sourcePath exists
alt sourcePath does not exist
cacheDependencies->>core: warning (path does not exist)
else sourcePath exists
alt sourcePath != targetPath
cacheDependencies->>fs: mkdir(targetDir, {recursive: true})
cacheDependencies->>fs: copyFile(sourcePath, targetPath)
cacheDependencies->>core: info (Copied file)
else
cacheDependencies->>core: info (Already in workspace)
end
cacheDependencies->>core: info (Resolved path)
end
else
Note over cacheDependencies: No cache-dependency-path provided
end
cacheDependencies->>getCacheDistributor: Call with dependencyPathForCache
cacheDependencies->>cacheDistributor: restoreCache()
cacheDistributor-->>cacheDependencies: Done
cacheDependencies-->>Workflow: Done
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Enhance dependency caching to support files located outside the workspace by copying them into the workspace before caching and update related exports, documentation, tests, and CI configuration.
New Features:
Enhancements:
CI:
Documentation:
Tests: