Include Python version in pip cache key

This commit is contained in:
Hugo van Kemenade 2021-12-16 16:28:50 +02:00
parent 156361d073
commit 4f512f8afc
3 changed files with 8 additions and 9 deletions

View file

@ -92,13 +92,9 @@ describe('restore-cache', () => {
dependencyFile
);
await cacheDistributor.restoreCache();
let pythonKey = '';
if (packageManager === 'pipenv') {
pythonKey = `python-${pythonVersion}-`;
}
expect(infoSpy).toHaveBeenCalledWith(
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${pythonKey}${packageManager}-${fileHash}`
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-python-${pythonVersion}-${packageManager}-${fileHash}`
);
}
);