Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIANXSVC-1214: Replace codecov with codeclimate #9

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@ jobs:
run: go vet ./...
- name: Run Go test
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

# 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
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: "coverage.txt:gocov"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ go-e5e

[![PkgGoDev](https://pkg.go.dev/badge/go.anx.io/e5e/v2)](https://pkg.go.dev/go.anx.io/e5e/v2)
[![Build Status](https://github.com/anexia/go-e5e/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/anexia/go-e5e/actions/?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/anexia/go-e5e/branch/main/graph/badge.svg)](https://codecov.io/gh/anexia/go-e5e)
[![Test Coverage](https://api.codeclimate.com/v1/badges/4707b867d2cb4052797e/test_coverage)](https://codeclimate.com/github/anexia-it/go-e5e/test_coverage)
[![Go Report Card](https://goreportcard.com/badge/go.anx.io/e5e/v2)](https://goreportcard.com/report/go.anx.io/e5e/v2)

go-e5e is a support library to help Go developers build Anexia e5e functions.
Expand Down
Loading