Skip to content

Commit

Permalink
Try dawidd6/action-download-artifact@v3 action instead of actions/dow…
Browse files Browse the repository at this point in the history
…nload-artifact@v4.
  • Loading branch information
afinetooth committed Sep 30, 2024
1 parent 84fba76 commit 4ba2801
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,35 @@ jobs:
run: |
echo "Run ID: ${{ steps.get_run_id.outputs.run-id }}"
# Download the coverage report generated from ci.yml
- name: Download coverage report
uses: actions/download-artifact@v4
- name: Download latest coverage summary
uses: dawidd6/action-download-artifact@v3
with:
name: coverage-report
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: ci.yml
name: coverage-summary
path: ./test/
run-id: ${{ steps.get_run_id.outputs.run-id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
search_artifacts: true
check_artifacts: true
if_no_artifact_found: warn

- name: Display coverage summary
run: cat ./test/coverage_summary.txt

# # Download the coverage report generated from ci.yml
# - name: Download coverage report
# uses: actions/download-artifact@v4
# with:
# name: coverage-report
# path: ./test/
# run-id: ${{ steps.get_run_id.outputs.run-id }}
# github-token: ${{ secrets.GITHUB_TOKEN }}

# Report coverage with x86_64 binary
- name: Test reporting coverage with x86_64 binary
env:
COVERALLS_REPO_TOKEN: ${{ github.token }}
run: |
binary=test/coveralls-linux-x86_64
cd coverage
COVERALLS_SERVICE_NUMBER=${{ github.run_id }}-x86_64-test $binary report --measure --base-path src/coverage_reporter/
test-linux-aarch64:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ jobs:
with:
name: coverage-report
path: coverage/
retention-days: 5

- name: Create coverage summary
run: |
echo "Coverage Summary" > coverage_summary.txt
echo "Date: $(date)" >> coverage_summary.txt
echo "Commit: ${{ github.sha }}" >> coverage_summary.txt
# Add more relevant info from your coverage report
- name: Upload coverage summary
uses: actions/upload-artifact@v4
with:
name: coverage-summary
path: coverage_summary.txt
retention-days: 5

- name: List uploaded artifacts
run: ls -la coverage/
Expand Down

0 comments on commit 4ba2801

Please sign in to comment.