mirror of
https://github.com/actions/setup-python.git
synced 2026-07-18 14:39:58 +08:00
Merge remote-tracking branch 'origin/main' into depsfix
# Conflicts: # .licenses/npm/@nodable/entities.dep.yml # .licenses/npm/anynum.dep.yml # .licenses/npm/fast-xml-parser.dep.yml # .licenses/npm/strnum.dep.yml # .licenses/npm/xml-naming.dep.yml # dist/cache-save/index.js # dist/setup/index.js # package-lock.json
This commit is contained in:
commit
8dce45f04b
20 changed files with 5791 additions and 94 deletions
|
|
@ -190,19 +190,12 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
|||
|
||||
restoredKeys.forEach(restoredKey => {
|
||||
if (restoredKey) {
|
||||
if (process.platform === 'linux' && packageManager === 'pip') {
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-20.04-Ubuntu-python-${pythonVersion}-${packageManager}-${fileHash}`
|
||||
);
|
||||
} else if (packageManager === 'poetry') {
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-v2-${fileHash}`
|
||||
);
|
||||
} else {
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-${fileHash}`
|
||||
);
|
||||
}
|
||||
const osSegment =
|
||||
process.platform === 'linux' ? '-20.04-Ubuntu' : '';
|
||||
const versionSuffix = packageManager === 'poetry' ? '-v2' : '';
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}${osSegment}-python-${pythonVersion}-${packageManager}${versionSuffix}-${fileHash}`
|
||||
);
|
||||
} else {
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`${packageManager} cache is not found`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue