add step to set go environment #2
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: "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 | |
- uses: ./.github/actions/setup-go | |
- 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 }} |