Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate covidr #330

Merged
merged 4 commits into from
Nov 20, 2023
Merged
Changes from all commits
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
13 changes: 7 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ jobs:
du -sh proffiles

echo "Executing grcov"
mkdir -p coverage
./grcov proffiles/ -s ./ --binary-path ./target/release/ \
-t html --branch --ignore-not-existing --ignore "target/release/build/*" \
-t html,covdir --branch --ignore-not-existing --ignore "target/release/build/*" \
--ignore "*mock.rs" --ignore "*tests.rs" \
-o coverage/ --llvm 2>&1 \
| tee grcov.log
Expand All @@ -125,14 +126,14 @@ jobs:
rm $INVALID
cd ..
./grcov proffiles/ -s ./ --binary-path ./target/release/ \
-t html --branch --ignore-not-existing --ignore "target/release/build/*" \
-t html,covdir --branch --ignore-not-existing --ignore "target/release/build/*" \
--ignore "*mock.rs" --ignore "*tests.rs" \
-o coverage/ --llvm
fi

echo "coverage_date=\"$(date)\"" >> $GITHUB_OUTPUT
echo "total_percent=$(grep -o '[0-9\.]*%' coverage/coverage.json)" >> $GITHUB_OUTPUT
wget ${{ vars.S3_BUCKET_URL }}/tanssi-coverage/branches/master/coverage.json \
echo "total_percent=$(grep -o '[0-9\.]*%' coverage/html/coverage.json)" >> $GITHUB_OUTPUT
wget ${{ vars.S3_BUCKET_URL }}/tanssi-coverage/branches/master/html/coverage.json \
-O coverage-master.json || true
echo "master_percent=$(grep -o '[0-9\.]*%' coverage-master.json || echo 'N/A')" >> $GITHUB_OUTPUT
rm -rf proffiles/
Expand All @@ -156,7 +157,7 @@ jobs:
if: ${{(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') }}
run: |
echo "${{steps.S3.outputs.object_key}}"
echo "${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/index.html"
echo "${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/html/index.html"
- name: Find Comment
if: ${{ needs.set-tags.outputs.coverage_report == 'true' }}
uses: peter-evans/find-comment@v2
Expand All @@ -174,6 +175,6 @@ jobs:
body: |
Master coverage: ${{ steps.coverage.outputs.master_percent }}
Coverage generated ${{ steps.coverage.outputs.coverage_date }}:
${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/index.html
${{ vars.S3_BUCKET_URL }}/${{steps.S3.outputs.object_key}}/html/index.html
Pull coverage: ${{ steps.coverage.outputs.total_percent }}
edit-mode: replace
Loading