Publish Coverage Report #393
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2022 Daniele Tentoni <[email protected] | |
# | |
# SPDX-License-Identifier: MIT | |
name: Publish Coverage Report | |
on: | |
workflow_run: | |
workflows: | |
- "Run Unit Tests" | |
types: | |
- completed | |
jobs: | |
upload: | |
name: Upload Coverage | |
runs-on: ubuntu-latest | |
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Download artifact | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: test.yml | |
name: code-coverage-report | |
workflow_conclusion: success | |
- name: Run Codacy Reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.xml | |
- name: Prepare git repository | |
run: | | |
git init | |
- name: Publish 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: cov_html |