Report Test Coverage #9
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: Report Test Coverage | |
on: | |
workflow_run: | |
workflows: | |
- Run Static Checks and Tests | |
types: [completed] | |
jobs: | |
report: | |
runs-on: ubuntu-latest | |
if: github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.workflow_run.head_repository.full_name }} | |
ref: ${{ github.event.workflow_run.head_branch }} | |
- name: Download test coverage | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: test.yml | |
name: coverage | |
- name: Report analysis to DeepSource | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key go --value-file ./cover.out | |
env: | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} |