Skip to content

Commit

Permalink
add workflow for coverage
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Jul 24, 2023
1 parent 3abbcde commit 2c2d46b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Coverage"

on:

# TODO: Delete it later.
push:
branches:
- "add-dump-action"

jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/dump-context

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 10
path: ${{ github.workspace }}
set-safe-directory: true
- name: Run coverage
continue-on-error: true
run: |
make coverage
- name: "Upload coverage report to Codecov"
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.out
- name: Upload coverage report to deepsource
run: |
mv ./coverage.out ./cover.out
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key go --value-file ./cover.out
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}

0 comments on commit 2c2d46b

Please sign in to comment.