Skip to content

Report Test Coverage #1

Report Test Coverage

Report Test Coverage #1

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:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Download test coverage
uses: actions/download-artifact@v3
with:
name: coverage
path: cover.out
- 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 }}