Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f677139

Browse filesBrowse files
Bump pyinstaller from 3.6 to 5.13.1 in /__tests__/data (actions#923)
* Update e2e-cache.yml * Update basic-validation.yml * Pyinstaller upgrade to 5.13.1 * pyinstaller-update * Update basic-validation.yml * Update e2e-cache.yml
1 parent 2bd53f9 commit f677139
Copy full SHA for f677139

File tree

Expand file treeCollapse file tree

4 files changed

+173
-360
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+173
-360
lines changed

‎__tests__/cache-restore.test.ts

Copy file name to clipboardExpand all lines: __tests__/cache-restore.test.ts
+25-13Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,31 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
184184
);
185185
}
186186

187-
if (process.platform === 'linux' && packageManager === 'pip') {
188-
expect(infoSpy).toHaveBeenCalledWith(
189-
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-20.04-Ubuntu-python-${pythonVersion}-${packageManager}-${fileHash}`
190-
);
191-
} else if (packageManager === 'poetry') {
192-
expect(infoSpy).toHaveBeenCalledWith(
193-
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-v2-${fileHash}`
194-
);
195-
} else {
196-
expect(infoSpy).toHaveBeenCalledWith(
197-
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-${fileHash}`
198-
);
199-
}
187+
const restoredKeys = restoreCacheSpy.mock.results.map(
188+
result => result.value
189+
);
190+
191+
restoredKeys.forEach(restoredKey => {
192+
if (restoredKey) {
193+
if (process.platform === 'linux' && packageManager === 'pip') {
194+
expect(infoSpy).toHaveBeenCalledWith(
195+
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-20.04-Ubuntu-python-${pythonVersion}-${packageManager}-${fileHash}`
196+
);
197+
} else if (packageManager === 'poetry') {
198+
expect(infoSpy).toHaveBeenCalledWith(
199+
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-v2-${fileHash}`
200+
);
201+
} else {
202+
expect(infoSpy).toHaveBeenCalledWith(
203+
`Cache restored from key: setup-python-${process.env['RUNNER_OS']}-${process.arch}-python-${pythonVersion}-${packageManager}-${fileHash}`
204+
);
205+
}
206+
} else {
207+
expect(infoSpy).toHaveBeenCalledWith(
208+
`${packageManager} cache is not found`
209+
);
210+
}
211+
});
200212
},
201213
30000
202214
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.