mirror of
https://github.com/VisActor/VChart
synced 2024-11-22 07:58:59 +00:00
test: add performance test in bugserver
This commit is contained in:
parent
f77d9b41b1
commit
b87816a340
@ -209,6 +209,28 @@ async function triggerPhotoTest({ scmVersion, scmVersionStatus }: { scmVersion:
|
||||
return res;
|
||||
}
|
||||
|
||||
async function triggerPerformanceTest({
|
||||
scmVersion,
|
||||
scmVersionStatus
|
||||
}: {
|
||||
scmVersion: string;
|
||||
scmVersionStatus: string;
|
||||
}) {
|
||||
const params = {
|
||||
triggerType: 'performance-test',
|
||||
scmVersion: scmVersion,
|
||||
scmVersionStatus: scmVersionStatus,
|
||||
commitId: process.env.GITHUB_SHA ?? '',
|
||||
commitUrl: process.env.GITHUB_REF ?? '',
|
||||
commitBranchName: process.env.GITHUB_HEAD_REF ?? '',
|
||||
commitCreateUser: process.env.GITHUB_ACTOR ?? '',
|
||||
commitDescription: ''
|
||||
};
|
||||
|
||||
const res = await fetch<TriggerPhotoTestData>(API_URL, 'POST', () => getFormData(params));
|
||||
return res;
|
||||
}
|
||||
|
||||
async function getPhotoResult({ scmVersion, bundleId }: { scmVersion: string; bundleId: string }) {
|
||||
const params = {
|
||||
triggerType: 'photo-result',
|
||||
@ -289,6 +311,9 @@ async function trigger() {
|
||||
`[trigger], test result status: ${photoTestStatus}, totalCount: ${totalCount}, successCount: ${successCount}`
|
||||
);
|
||||
|
||||
// trigger performance test
|
||||
await triggerPerformanceTest({ scmVersion, scmVersionStatus });
|
||||
|
||||
if (photoTestStatus !== 'ok') {
|
||||
throw new Error(`photo test status: ${photoTestStatus}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user