Skip to content

Commit f677139

Browse files
Bump pyinstaller from 3.6 to 5.13.1 in /__tests__/data (#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

File tree

4 files changed

+173
-360
lines changed

4 files changed

+173
-360
lines changed

__tests__/cache-restore.test.ts

+25-13
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)