diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 3da0d80..e3ff547 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -34,5 +34,6 @@ jobs: - id: show_full_log name: Show Full Log + if: success() || failure() run: | cat log.txt \ No newline at end of file diff --git a/smoke-test.js b/smoke-test.js index 1246405..15c445d 100644 --- a/smoke-test.js +++ b/smoke-test.js @@ -11,10 +11,10 @@ const checkoutRepoToPath = (repoPath, destPath, returnPath) => { return cloneStdout + "\r\n" + installStdout; }; -// The different commands require the generators to be installed in different locations const jsGeneratorLocation = "smoke-js"; const tsGeneratorLocation = "smoke-ts"; +// NOTE: The JS and TS generators are installed in different relative paths because generator-options and test-generators require different relative paths. const jsInstallStdout = checkoutRepoToPath( "https://github.com/ScottLogic/openapi-forge-javascript", jsGeneratorLocation, @@ -50,7 +50,7 @@ const testGeneratorsStdout = shell.exec( const { scenarios, passed } = JSON.parse(testGeneratorsStdout)[tsGeneratorLocation]; -if (scenarios > 0 && scenarios === passed) { +if (scenarios > 100000000000 && scenarios === passed) { console.log("test-generators command succeeded"); } else { console.error( @@ -72,6 +72,7 @@ if (forgeStdout.includes("SUCCESSFUL")) { process.exitCode = 1; } +// Clean up shell.rm("-rf", jsGeneratorLocation, `../${tsGeneratorLocation}`, tempFolder); fs.writeFileSync(