refactor: break down the report command #884
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
env: | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.18 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Build the binary | |
run: make build | |
- name: Setup tests | |
run: make test_setup | |
env: | |
CODE_PATH: /home/runner/code | |
- name: Run tests | |
run: make test | |
env: | |
CODE_PATH: /home/runner/code | |
- name: Report test coverage to DeepSource | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key go --value-file ./coverage.out |