diff --git a/.github/workflows/trigger_coverage_bot.yml b/.github/workflows/trigger_coverage_bot.yml new file mode 100644 index 0000000000..d1bce5e4db --- /dev/null +++ b/.github/workflows/trigger_coverage_bot.yml @@ -0,0 +1,48 @@ +--- + +name: Trigger coverage bot + +on: + workflow_run: + workflows: ["CI pipeline for pySDC"] + types: ["completed"] + +jobs: + + Upload to Codecov: + runs-on: ubuntu-latest + + if: ${{ github.repository_owner == 'Parallel-in-Time' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.pull_requests != '' }} + + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Conda environment with Micromamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: "etc/environment-postprocess.yml" + + - name: Downloading artifacts + uses: actions/download-artifact@v4 + with: + path: . + merge-multiple: true + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.ACTION_READ_TOKEN }} + + - name: Prepare artifacts + run: | + python -m coverage combine coverage_*.dat + python -m coverage xml + python -m coverage html + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV }} +