Merge branch 'CI/FV/urls' into fv/Governor
This commit is contained in:
@ -75,13 +75,16 @@ async function runCertora(spec, contract, files, options = []) {
|
|||||||
|
|
||||||
// as soon as we have a jobStatus link, print it
|
// as soon as we have a jobStatus link, print it
|
||||||
stream.on('data', function logStatusUrl(data) {
|
stream.on('data', function logStatusUrl(data) {
|
||||||
const urls = data.toString('utf8').match(/https?:\S*/g);
|
const { '-DjobId': jobId, '-DuserId': userId } = Object.fromEntries(
|
||||||
for (const url of urls ?? []) {
|
data
|
||||||
if (url.includes('/jobStatus/')) {
|
.toString('utf8')
|
||||||
console.error(`[${spec}] ${url.replace('/jobStatus/', '/output/')}`);
|
.match(/-D\S+=\S+/g)
|
||||||
stream.off('data', logStatusUrl);
|
?.map(s => s.split('=')) || [],
|
||||||
break;
|
);
|
||||||
}
|
|
||||||
|
if (jobId && userId) {
|
||||||
|
console.error(`[${spec}] https://prover.certora.com/output/${userId}/${jobId}/`);
|
||||||
|
stream.off('data', logStatusUrl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -98,7 +101,7 @@ async function runCertora(spec, contract, files, options = []) {
|
|||||||
stream.end();
|
stream.end();
|
||||||
|
|
||||||
// write results in markdown format
|
// write results in markdown format
|
||||||
writeEntry(spec, contract, code || signal, (await output).match(/https:\S*/)?.[0]);
|
writeEntry(spec, contract, code || signal, (await output).match(/https:\/\/prover.certora.com\/output\/\S*/)?.[0]);
|
||||||
|
|
||||||
// write all details
|
// write all details
|
||||||
console.error(`+ certoraRun ${args.join(' ')}\n` + (await output));
|
console.error(`+ certoraRun ${args.join(' ')}\n` + (await output));
|
||||||
@ -136,8 +139,8 @@ function writeEntry(spec, contract, success, url) {
|
|||||||
spec,
|
spec,
|
||||||
contract,
|
contract,
|
||||||
success ? ':x:' : ':heavy_check_mark:',
|
success ? ':x:' : ':heavy_check_mark:',
|
||||||
|
url ? `[link](${url?.replace('/output/', '/jobStatus/')})` : 'error',
|
||||||
url ? `[link](${url})` : 'error',
|
url ? `[link](${url})` : 'error',
|
||||||
url ? `[link](${url?.replace('/jobStatus/', '/output/')})` : 'error',
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user