Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/validate#34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 11 commits intomasterfromfeature/validate
Jun 13, 2020
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
prepare for test runner tests
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
@ShMcK
ShMcK committedJun 13, 2020
commit514b2ad5b781e52b83944618ee1e7614344f8d88
37 changes: 17 additions & 20 deletionssrc/validate.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,14 +78,14 @@ async function validate(args: string[]) {
}

for (const level of skeleton.levels) {
if (level.setup) {
if (level?.setup) {
// load commits
if (commits[`${level.id}`]) {
console.log(`Loading ${level.id} commits...`);
await cherryPick(commits[level.id]);
}
// run commands
if (level.setup.commands) {
if (level.setup?.commands) {
console.log(`Running ${level.id} commands...`);
await runCommands(level.setup.commands);
}
Expand All@@ -105,14 +105,17 @@ async function validate(args: string[]) {
await runCommands(step.setup.commands);
}

// ignore runnning tests on steps with no solution
if (step.solution) {
const stepSolutionCommits = commits[`${step.id}A`];
const hasSolution = step.solution || stepSolutionCommits;

// ignore running tests on steps with no solution
if (hasSolution) {
// run test
console.info("Running test");
console.info("Running setup test");
// expect fail
// await runTest();
}

const stepSolutionCommits = commits[`${step.id}A`];
if (stepSolutionCommits) {
console.info(`Loading ${step.id} solution commits...`);
await cherryPick(stepSolutionCommits);
Expand All@@ -123,30 +126,24 @@ async function validate(args: string[]) {
console.info(`Running ${step.id} solution commands...`);
await runCommands(step.solution.commands);
}

if (hasSolution) {
// run test
console.info("Running solution test");
// expect pass
// await runTest();
}
}
}
}

// run test runner setup command(s)
// loop over commits:
// - load level commit
// - run level setup command(s)
// - load step setup commit(s)
// - run step setup command(s)
// - if next solution:
// - run test - expect fail
// - if solution
// - run test - expect pass

// log level/step
// on error, show level/step & error message

// load INIT commit(s)
} catch (e) {
console.error(e.message);
} finally {
// cleanup
//await fs.emptyDir(tmpDir);
await fs.emptyDir(tmpDir);
}
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp