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

ci: integrate with Codecov for test coverage #211

Merged
merged 4 commits into from
Jun 13, 2019
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
16 changes: 10 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ jobs:
command: |
make dist/sso-proxy
- run:
name: push sso-dev image
command: |
if [[ -n $DOCKER_USER ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
make imagepush
fi
name: push sso-dev image
command: |
if [[ -n $DOCKER_USER ]]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
make imagepush
fi
- run:
name: upload coverage file to codecov
command: |
bash <(curl -s https://codecov.io/bash)
Jusshersmith marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 23 additions & 0 deletions .codecov/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
coverage:
precision: 2
round: down
range: "50...80"

status:
project: yes
patch: yes
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header, diff, files"
behavior: default
require_changes: no

Copy link
Contributor Author

@Jusshersmith Jusshersmith Jun 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is largely a default config, with the only changes so far being:

  • removal of notifications for the time being
  • lowered the 'range' (preferred range, among other settings to be decided)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

@Jusshersmith Jusshersmith Jun 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also added a list of files that are impacted by the pull request and their coverage to the PR comment that is left.

2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ go vet ./...

echo "running tests ..."
cd internal
go test -cover -race ./... $@
go test -coverprofile=coverage.out -race ./... $@