Skip to content

Commit

Permalink
test-9
Browse files Browse the repository at this point in the history
  • Loading branch information
jpb06 committed Feb 22, 2023
1 parent c08ba3a commit 70bb647
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/workflow/actionWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,21 @@ export const actionWorkflow = async (): Promise<void> => {
const summaryPathInput = getInput('coverage-summary-path');
const summaryPath = summaryPathInput === '' ? undefined : summaryPathInput;

const outputPath = getInput('output-folder');
// this must be checked before generating badges (duh!)
const badgesExist = await doBadgesExist(outputPath);

info(
`🔶 Generating badges from ${
summaryPath ? summaryPath : 'default coverage summary path'
}`,
);
const outputPath = getInput('output-folder');
console.log('before lib call', summaryPath, outputPath);
await generateBadges(summaryPath, outputPath);
console.log('after lib call');

if (!shouldCommit) {
return info("🔶 `no-commit` set to true: badges won't be committed");
}

const badgesExist = await doBadgesExist(outputPath);

const hasEvolved = await hasCoverageEvolved(badgesExist, outputPath);
if (!hasEvolved) {
return info('🔶 Coverage has not evolved, no action required.');
Expand Down

0 comments on commit 70bb647

Please sign in to comment.