It's very common to be able to "run" some commands after building things (or even to build things).
A run sequence is a target and its role is to execute a list of commands.
Bec
This attribute would prevent a target from being in the graph by default (ie: you need to ask the buildsystem to build this target).
"build envs=": { is: "group", elements: [
{ is: "environment", name: "local" },
{ is: "environment", name: "travis", tags: ["ci"] },
{ is: "environment", name: "gitlab", tags: ["ci"] },
{ is: "environment", name: "appveyor", tags: ["ci"] },
]},
"build msbuildsystem=": { is: "target", type: "run-sequence",
manual: true, // force explicit requirement of the target
environments: "=build envs",
sequenceByEnvironment: {
"=? ci": ["=install", "=build", "=test", "=coverage", "=tocoveralls"]
"=build env:local": [ "=build", "=test", "=coverage", "=tohtml" ]
},
"install=": { is: "group", elements: [
{ is: "component", cmd: "npm install -q -g @openmicrostep/msbuildsystem.cli@^0.4.0" },
{ is: "component", cmd: "msbuildsystem modules install @openmicrostep/msbuildsystem.js.typescript@^0.4.0" },
]},
"build=": { is: "group", elements: [
{ is: "component", cmd: "msbuildsystem build -p @msbuildsystem -w dist/1/" },
{ is: "component", cmd: "node dist/1/node/node_modules/@openmicrostep/msbuildsystem.cli/index.js build -p @msbuildsystem -w dist/2/" },
{ is: "component", cmd: "node dist/2/node/node_modules/@openmicrostep/msbuildsystem.cli/index.js build -p @msbuildsystem -w dist/3/" },
]},
"test=" : { is: "component", cmd: `mstests -c -t 20000 ${tests}` },
"coverage=" : { is: "component", cmd: `istanbul cover mstests --report json -x 'msbuildsystem.*.tests/**' --root dist/3/node/node_modules/@openmicrostep/ -- -c -t 20000 -i -g perf ${tests}` },
"tohtml=" : { is: "component", cmd: " cat ./coverage/coverage-final.json | remap-istanbul --output coverage --type html" },
"tocoveralls=": { is: "component", cmd: "cat ./coverage/coverage-final.json | remap-istanbul --type lcovonly | coveralls" },
}