Skip to content

DeepSource Test Coverage #374

DeepSource Test Coverage

DeepSource Test Coverage #374

Workflow file for this run

name: DeepSource Test Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "19 7 * * 2"
jobs:
go-test:
name: Go Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Report test-coverage to DeepSource
run: |
go test -coverprofile=${COVERAGE_FILE} -v ./...
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key $LANGUAGE_KEY --value-file ${COVERAGE_FILE}
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
COVERAGE_FILE: cover.out
LANGUAGE_KEY: go