diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..52ad7e9 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,8 @@ +coverage: + range: 80..95 + round: down + precision: 2 + status: + project: yes + patch: yes + changes: yes diff --git a/.travis.yml b/.travis.yml index d88e551..46d3719 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,6 @@ cache: before_install: - npm i -g npm script: - - make clean init check-style build docker + - make clean init check-style build test docker +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index d5e4d1d..6280b91 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,11 @@ build: clean init cd ./components/portal; \ npm run build +.PHONY: test +test: build + cd ./components/portal; \ + npm run test + .PHONY: docker docker: build docker build -t $(DOCKER_REPO)/cellery-hub-proxy:$(DOCKER_IMAGE_TAG) -f ./docker/proxy/Dockerfile . diff --git a/components/portal/package.json b/components/portal/package.json index c4cbe27..a6ed085 100644 --- a/components/portal/package.json +++ b/components/portal/package.json @@ -19,7 +19,7 @@ "build": "react-scripts build", "lint": "eslint --color src/", "lint:fix": "eslint --color --fix src/", - "test": "react-scripts test", + "test": "CI=true react-scripts test --colors --testURL=http://hub.cellery.io --coverage", "eject": "react-scripts eject" }, "eslintConfig": {