test: post-install

This commit is contained in:
Tom Hu 2023-10-25 20:52:21 +08:00
parent 96093cebb8
commit b771dfb5ad
No known key found for this signature in database
GPG key ID: 79155678363963D2
4 changed files with 25561 additions and 12944 deletions

38496
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -33,16 +33,15 @@ const verify = async (
const shasumRes = await request(
`${getBaseUrl(platform, version)}.SHA256SUM`,
);
const shasum = await shasumRes.text();
const shasum = await shasumRes.body.text();
if (verbose) {
console.log(`Received SHA256SUM ${shasum}`);
}
setFailure(`Codecov: Error validating uploader: ${err.message}`, failCi);
const shaSigRes = await request(
`${getBaseUrl(platform, version)}.SHA256SUM.sig`,
);
const shaSig = await shaSigRes.text();
const shaSig = await shaSigRes.body.text();
if (verbose) {
console.log(`Received SHA256SUM signature ${shaSig}`);
}

View file

@ -13,7 +13,7 @@ const versionInfo = async (
const metadataRes = await request(`https://uploader.codecov.io/${platform}/latest`, {
headers: {'Accept': 'application/json'},
});
const metadata = await metadataRes.json();
const metadata = await metadataRes.body.json();
core.info(`==> Running version ${metadata['version']}`);
} catch (err) {
core.info(`Could not pull latest version information: ${err}`);