Skip to content

Commit

Permalink
fixup! SIANXSVC-1214: Replace codecov with codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
nachtjasmin committed Feb 28, 2024
1 parent 65a064b commit 656ba81
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ jobs:
run: go vet ./...
- name: Run Go test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codeclimate

# Because the module path differs from the path, we have to to remove the prefix from
# the cover file. See also:
# https://github.com/paambaati/codeclimate-action/issues/109#issuecomment-751311299
- name: Adjust code coverage report for CodeClimate
run: |
export GO_MODULE_NAME=(go mod edit -json | jq -r '.Module.Path')
sed -i "s%$GO_MODULE_NAME/%%" coverage.txt
- name: Upload coverage to CodeClimate
if: ${{ github.event.name != 'pull_request' }}
uses: paambaati/codeclimate-action@v5
with:
coverageLocations: "coverage.txt:gocov"

0 comments on commit 656ba81

Please sign in to comment.