Upload coverage results to Code Climate #24
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
name: Upload coverage results to Code Climate | |
on: | |
workflow_run: | |
workflows: [CI] | |
types: [completed] | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.workflow_run.head_branch }} | |
- name: Fetch coverage report | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage-json | |
run-id: ${{ github.event.workflow_run.id }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload coverage report to Code Climate | |
uses: paambaati/codeclimate-action@v5 | |
with: | |
coverageLocations: | | |
${{github.workspace}}/coverage.json:simplecov | |
env: | |
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |