Skip to content

Commit

Permalink
added codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
kopaygorodsky committed May 29, 2021
1 parent a74af46 commit 2be8fbf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ jobs:
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
# - run:
# name: Install Docker Compose
# command: |
# curl -L https://github.com/docker/compose/releases/download/1.25.3/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
# chmod +x ~/docker-compose
# sudo mv ~/docker-compose /usr/local/bin/docker-compose
- run:
name: Install Dependencies
command: |
Expand Down Expand Up @@ -65,5 +59,11 @@ jobs:
command: |
make test
make integration-test
- run:
name: Upload reports to codecov
environment:
CODECOV_TOKEN: bda85e20-4eff-4789-9e73-03201ba00833
command: |
bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: /tmp/test-reports
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
classes/
out/

coverage.txt
lint-report.xml

######################
# Mac OSX
######################
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ENV_LOCAL_TEST=\
MYSQL_USER=foreman \
MYSQL_PASSWORD=foreman

CI_REPORTS_DIR ?= reports
#CI_REPORTS_DIR ?= reports

.PHONY: tools
tools:
Expand Down Expand Up @@ -65,7 +65,8 @@ test:

.PHONY: test-report
test-report: create_reports_dir #lint
go test -coverprofile=$(CI_REPORTS_DIR)/coverage.out -json $(UNIT_TEST_PKGS) > $(CI_REPORTS_DIR)/report.json
#go test -coverprofile=$(CI_REPORTS_DIR)/coverage.txt -covermode=atomic -json $(UNIT_TEST_PKGS) > $(CI_REPORTS_DIR)/report.json
go test -coverprofile=coverage.txt -covermode=atomic $(UNIT_TEST_PKGS)

integration-test:
go test $(INTEGRATION_TEST_PKGS)
Expand All @@ -76,7 +77,7 @@ lint:

.PHONY: lint-report
lint-report: create_reports_dir
golangci-lintgolangci-lint run -v --issues-exit-code=0 --out-format checkstyle > $(CI_REPORTS_DIR)/report.xml
golangci-lintgolangci-lint run -v --issues-exit-code=0 --out-format checkstyle > lint-report.xml

.PHONY: create_reports_dir
create_reports_dir:
Expand Down

0 comments on commit 2be8fbf

Please sign in to comment.