diff --git a/.circleci/config.yml b/.circleci/config.yml index 500e58f6..91ff9412 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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) diff --git a/.codecov/codecov.yml b/.codecov/codecov.yml new file mode 100644 index 00000000..b3d2bb90 --- /dev/null +++ b/.codecov/codecov.yml @@ -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 + diff --git a/scripts/test b/scripts/test index 44f7003b..6afb0941 100755 --- a/scripts/test +++ b/scripts/test @@ -32,4 +32,4 @@ go vet ./... echo "running tests ..." cd internal -go test -cover -race ./... $@ +go test -coverprofile=coverage.out -race ./... $@