From 4ba2801502cbdf83fcbd6c94ccd9da10e6b33a65 Mon Sep 17 00:00:00 2001 From: James Kessler Date: Mon, 30 Sep 2024 16:58:15 -0700 Subject: [PATCH] Try dawidd6/action-download-artifact@v3 action instead of actions/download-artifact@v4. --- .github/workflows/build.yml | 27 ++++++++++++++++++++------- .github/workflows/ci.yml | 15 +++++++++++++++ 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7df7c22..f75827f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,14 +138,28 @@ 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 @@ -153,7 +167,6 @@ jobs: 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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6677b74..46529b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/