From e7a60aa275c33d58f761e61eaa316bd43ea475c3 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 4 Apr 2024 18:09:21 +0200 Subject: [PATCH] Testing --- .github/workflows/coverage_comment.yml | 25 +++++++++++++++++++++++++ .github/workflows/tests.yml | 12 +++++------- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/coverage_comment.yml diff --git a/.github/workflows/coverage_comment.yml b/.github/workflows/coverage_comment.yml new file mode 100644 index 000000000..bd6b315ce --- /dev/null +++ b/.github/workflows/coverage_comment.yml @@ -0,0 +1,25 @@ +name: 'coverage_comment' + +on: + workflow_run: + workflows: ['Verify packages abilities'] + types: + - completed + +jobs: + download_coverage: + runs-on: ubuntu-latest + if: github.event.workflow_run.payload.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + run_id: ${{ github.event.workflow_run.id }} + name: code-coverage-results.md + path: . + - name: Add PR comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + number: ${{ github.event.workflow_run.payload.workflow_run.pull_requests[0].number }} + recreate: true + path: code-coverage-results.md diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ca9ba7ad..2cc7c24e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -101,10 +101,8 @@ jobs: with: artifact_download_workflow_names: 'Verify packages abilities,coverage_baseline' filename: 'coverage/cobertura.xml' -# - name: '[Coverage] Add PR comment' -# uses: marocchino/sticky-pull-request-comment@v2 -# #Make sure the report was generated and that the event is actually a pull request, run if failed or success -# if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]' && steps.code_coverage_report.outputs.file != '' && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && (success() || failure()) }} -# with: -# recreate: true -# path: code-coverage-results.md + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: code-coverage-results.md + path: code-coverage-results.md \ No newline at end of file