refactor: app deployment

This commit is contained in:
2023-06-16 11:40:23 +02:00
parent d61d16e752
commit 5b4d2bd16c
39 changed files with 523 additions and 246 deletions

View File

@@ -2,8 +2,16 @@
import {promisify} from 'node:util';
import {glob} from 'glob';
import {exec} from 'node:child_process';
import {mergeFiles} from 'junit-report-merger';
const files = await glob('./*/*/coverage/cobertura-coverage.xml');
const args = files.map(it => `${it.split('/', 2)[1]}='${it}'`);
console.log(await promisify(exec)(`cobertura-merge -o ./coverage.xml ${args.join(' ')}`));
console.log(
'Collecting coverage...',
await promisify(exec)(`cobertura-merge -o ./coverage.xml ${args.join(' ')}`),
);
const reportFiles = await glob('./*/*/coverage/report-junit.xml');
console.log('Collecting reports...', reportFiles);
await mergeFiles('./report-junit.xml', reportFiles);