Skip to content

Commit

Permalink
fix 10
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-akamai committed Oct 19, 2023
1 parent 4c15da9 commit 79ed768
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ref_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,12 @@ jobs:
# current_coverage=$(cat ${{ github.workspace }}/current_code_coverage.txt)
# comment_message="Base Coverage: $base_coverage\nCurrent Coverage: $current_coverage"
# echo "$comment_message" > updated_comment.txt

- name: Debugging - List Contents of Directory
run: |
ls -R
ls -R packages/manager
working-directory: ${{ github.workspace }}

- name: Log Code Coverage
run: |
base_coverage=$(cat ref_code_coverage.txt)
current_coverage=$(cat current_code_coverage.txt)
comment_message="Base Coverage: $base_coverage\nCurrent Coverage: $current_coverage"
comment_message="Base Coverage: $base_coverage - Current Coverage: $current_coverage"
echo "Coverage: $comment_message"
### THIS WILL FAIL
Expand Down
5 changes: 4 additions & 1 deletion scripts/coverage-report/getCoverage.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { readCoverage } from "./readCoverage.mjs";

readCoverage();
const coveragePercentage = readCoverage();

// Intentional log for our GH Action to pick up the value
console.log(coveragePercentage);
4 changes: 2 additions & 2 deletions scripts/coverage-report/readCoverage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export function readCoverage() {
const coveragePercentageNumber = parseFloat(coveragePercentage);

logger.success({
message: "Successfully retrieved the base branch coverage!",
message: "Successfully retrieved the branch coverage!",
info: `Coverage: ${coveragePercentage}`,
});

return coveragePercentageNumber;
} catch (error) {
logger.error({
message: "Something went wrong while getting base branch coverage.",
message: "Something went wrong while getting the branch coverage.",
info: error,
});
}
Expand Down

0 comments on commit 79ed768

Please sign in to comment.