@@ -58,14 +58,15 @@ async function validate(args: string[]) {
5858const runTest = createTestRunner ( tmpDir , skeleton . config . testRunner ) ;
5959
6060// setup
61+ console . info ( "* Setup" ) ;
6162if ( commits . INIT ) {
6263// load commits
63- console . info ( "Loading setup commits..." ) ;
64+ console . info ( "-- Loading commits..." ) ;
6465await cherryPick ( commits . INIT ) ;
6566
6667// run commands
6768if ( skeleton . config ?. testRunner ?. setup ?. commands ) {
68- console . info ( "Running setup commands..." ) ;
69+ console . info ( "-- Running commands..." ) ;
6970
7071await runCommands (
7172skeleton . config ?. testRunner ?. setup ?. commands ,
@@ -76,30 +77,32 @@ async function validate(args: string[]) {
7677}
7778
7879for ( const level of skeleton . levels ) {
80+ console . info ( `*${ level . id } ` ) ;
7981if ( level ?. setup ) {
8082// load commits
8183if ( commits [ `${ level . id } ` ] ) {
82- console . log ( `Loading ${ level . id } commits...` ) ;
84+ console . log ( `-- Loading commits...` ) ;
8385await cherryPick ( commits [ level . id ] ) ;
8486}
8587// run commands
8688if ( level . setup ?. commands ) {
87- console . log ( `Running ${ level . id } commands...` ) ;
89+ console . log ( `-- Running commands...` ) ;
8890await runCommands ( level . setup . commands ) ;
8991}
9092}
9193// steps
9294if ( level . steps ) {
9395for ( const step of level . steps ) {
96+ console . info ( `**${ step . id } ` ) ;
9497// load commits
9598const stepSetupCommits = commits [ `${ step . id } Q` ] ;
9699if ( stepSetupCommits ) {
97- console . info ( `Loading ${ step . id } setup commits...` ) ;
100+ console . info ( `--- Loading setup commits...` ) ;
98101await cherryPick ( stepSetupCommits ) ;
99102}
100103// run commands
101104if ( step . setup . commands ) {
102- console . info ( `Running ${ step . id } setup commands...` ) ;
105+ console . info ( `--- Running setup commands...` ) ;
103106await runCommands ( step . setup . commands ) ;
104107}
105108
@@ -109,47 +112,49 @@ async function validate(args: string[]) {
109112// ignore running tests on steps with no solution
110113if ( hasSolution ) {
111114// run test
112- console . info ( "Running setup test" ) ;
115+ console . info ( "--- Running setup test... " ) ;
113116// expect fail
114117const { stdout, stderr} = await runTest ( ) ;
115118if ( stdout ) {
116119console . error (
117- `Expected${ step . id } setup tests to fail, but passed`
120+ `--- Expected${ step . id } setup tests to fail, but passed`
118121) ;
122+ // log tests
119123console . log ( stdout ) ;
120124}
121125}
122126
123127if ( stepSolutionCommits ) {
124- console . info ( `Loading ${ step . id } solution commits...` ) ;
128+ console . info ( `--- Loading solution commits...` ) ;
125129await cherryPick ( stepSolutionCommits ) ;
126130}
127131
128132// run commands
129133if ( step ?. solution ?. commands ) {
130- console . info ( `Running ${ step . id } solution commands...` ) ;
134+ console . info ( `--- Running solution commands...` ) ;
131135await runCommands ( step . solution . commands ) ;
132136}
133137
134138if ( hasSolution ) {
135139// run test
136- console . info ( "Running solution test" ) ;
140+ console . info ( "--- Running solution test... " ) ;
137141// expect pass
138142const { stdout, stderr} = await runTest ( ) ;
139143if ( stderr ) {
140144console . error (
141- `Expected${ step . id } solution tests to pass, but failed`
145+ `--- Expected${ step . id } solution tests to pass, but failed`
142146) ;
147+ // log tests
143148console . log ( stderr ) ;
144149}
145150}
146151}
147152}
148153}
149154
150- // log level/step
151- // on error, show level/step & error message
155+ console . info ( `\n✔ Success!` ) ;
152156} catch ( e ) {
157+ console . error ( "\n✘ Fail!" ) ;
153158console . error ( e . message ) ;
154159} finally {
155160// cleanup