Skip to content

Commit

Permalink
Bump pyinstaller from 3.6 to 5.13.1 in /__tests__/data (#923)
Browse files Browse the repository at this point in the history
* Update e2e-cache.yml

* Update basic-validation.yml

* Pyinstaller upgrade to 5.13.1

* pyinstaller-update

* Update basic-validation.yml

* Update e2e-cache.yml
  • Loading branch information
aparnajyothi-y committed Aug 13, 2024
1 parent 2bd53f9 commit f677139
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 360 deletions.
38 changes: 25 additions & 13 deletions __tests__/cache-restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,31 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
);
}

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 restoredKeys = restoreCacheSpy.mock.results.map(
result => result.value
);

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}`
);
}
} else {
expect(infoSpy).toHaveBeenCalledWith(
`${packageManager} cache is not found`
);
}
});
},
30000
);
Expand Down
Loading

0 comments on commit f677139

Please sign in to comment.