test: CI grouping?

This commit is contained in:
cha0s 2024-02-11 22:37:25 -06:00
parent cf0b780182
commit e9a300fd46

View File

@ -1,4 +1,4 @@
const {join} = require('path');
const {join, relative} = require('path');
const {processCode, spawnWith} = require('@flecks/core/src/server');
const {glob} = require('glob');
@ -15,6 +15,11 @@ const {workspaces} = require(join(FLECKS_CORE_ROOT, 'package.json'));
(async () => {
process.exitCode = await concurrent(
(await Promise.all(workspaces.map((path) => glob(join(FLECKS_CORE_ROOT, path))))).flat(),
(cwd) => processCode(spawnWith(args, {cwd})),
async (cwd) => {
console.log(`::group::{${relative(FLECKS_CORE_ROOT, cwd)}}`);
const code = await processCode(spawnWith(args, {cwd}));
console.log(`::endgroup::{${relative(FLECKS_CORE_ROOT, cwd)}}`);
return code;
},
);
})();