From 3b1906fae85961d46d5e3e6d9a56a1ad126456e3 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Tue, 25 Jun 2024 14:33:29 -0400 Subject: [PATCH] add pull request coverage diff report --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f446dca1..4df4e755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,20 @@ jobs: envs: | - linux: py311-jwst-xdist - linux: py311-romancal-xdist + report_diff_coverage: + needs: [ test ] + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/setup-python@v5 + - run: pip install diff-cover coverage + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: pip install . + - uses: actions/download-artifact@v4 + with: + pattern: ".coverage*" + merge-multiple: true + - run: coverage xml + - run: diff-cover coverage.xml --compare-branch origin/${{ github.base_ref }} --markdown-report $GITHUB_STEP_SUMMARY