Skip to content

Commit

Permalink
fix(ci/code-coverage-deploy): fix references to non-existent env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasdewally committed Oct 22, 2024
1 parent 0ec3caf commit c3e7645
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/code-coverage-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ jobs:
if: steps.find_artifacts.outputs.result != '[]'
uses: actions/download-artifact@v4
with:
name: code-coverage-${{ env.num }}-${{ env.previous_artifact_id }}
name: code-coverage-${{ steps.prnum.outputs.num}}-${{ env.previous_artifact_id }}
path: ./tools/code-coverage-diff/deploy-prev

# this will be used for future visualizations in the coverage report (requiring external python libs)
Expand All @@ -260,20 +260,21 @@ jobs:
echo 'EOFABC'
} >> "$GITHUB_ENV"
- name: Calculate coverage difference with previous historical lcov artifact
if: steps.find_artifacts.outputs.result != '[]'
id: historicalcoveragediff
run: |
# create summary of previous (historical) lcov summary for main and pr
lcov --summary ./tools/code-coverage-diff/deploy-prev/code-coverage-${{ env.num }}-${{ env.previous_artifact_id }} > historical_coverage_lcov.txt
lcov --summary ./tools/code-coverage-diff/deploy-prev/code-coverage-${{ steps.prnum.outputs.num }}-${{ env.previous_artifact_id }} > historical_coverage_lcov.txt
{
echo "hist_main_summary<<EOFABC"
cat historical_coverage_lcov.txt | tail -n +3
echo "EOFABC"
} >> "$GITHUB_ENV"
- name: Calculate coverage difference with previous historical lcov artifact
if: steps.find_artifacts.outputs.result != '[]'
id: historicalcoveragediff
run: |
# call python script to compare historical previous main coverage with current main coverage
python ./tools/code-coverage-diff/calculate_coverage_difference.py "${{ steps.lcov.outputs.main }}" "${{ steps.coveragediff.outputs.hist_main_summary }}" > ./tools/code-coverage-diff/lcov/hist_coverage_diff.txt
python ./tools/code-coverage-diff/calculate_coverage_difference.py "${{ steps.lcov.outputs.main }}" "${{ env.hist_main_summary }}" > ./tools/code-coverage-diff/lcov/hist_coverage_diff.txt
# store into output variable for comment display
{
Expand Down

0 comments on commit c3e7645

Please sign in to comment.