Skip to content

Commit

Permalink
Generate separate coverage reports for frontend and backend (#7151)
Browse files Browse the repository at this point in the history
* Remove codecov from backend tests

* make changes

* undo last commit

* remove todo

* add codecov yaml file

* remove c

* use token

* empty

* add codeowner

* add target and threshold

* add badge
  • Loading branch information
Rishav Chakraborty authored and kevinlee12 committed Jul 31, 2019
1 parent 68b8b47 commit 5335d8b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 10 deletions.
11 changes: 2 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,11 @@ jobs:
name: Run frontend tests
command: |
bash -x scripts/run_frontend_tests.sh --run-minified-tests=true
# TODO(lilithxxx): Uncomment the following lines once #6821 is resolved.
# - run:
# <<: *install_cc
- run:
name: Generate frontend coverage report
command: |
sudo pip install codecov
codecov --file ../karma_coverage_reports/lcov.info
# TODO(lilithxxx): Uncomment the following lines and delete the above
# codecov statements once #6821 is resolved.
# ./cc-test-reporter sum-coverage ../karma_coverage_reports/coverage-final.json
# ./cc-test-reporter upload-coverage ../karma_coverage_reports/coverage-final.json
codecov --file ../karma_coverage_reports/lcov.info -F frontend
when: on_success

backend_tests:
Expand All @@ -107,7 +100,7 @@ jobs:
name: Generate backend coverage report
command: |
sudo pip install codecov
codecov
codecov -F backend
./cc-test-reporter format-coverage -t coverage.py coverage.xml
./cc-test-reporter sum-coverage coverage/codeclimate.json
./cc-test-reporter upload-coverage
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
/.pylintrc @kevinlee12
/.stylelintrc @kevinlee12
/.travis.yml @kevinlee12
/codecov.yml @lilithxxx
/core/templates/dev/head/css/.stylelintrc @kevinlee12
/tox.ini @kevinlee12
/scripts/ @kevinlee12
Expand Down
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Oppia](https://www.oppia.org) [![Build Status](https://api.travis-ci.org/oppia/oppia.svg?branch=develop)](https://travis-ci.org/oppia/oppia) [![Code Coverage](https://api.codeclimate.com/v1/badges/eaa9dfe89c760481079d/test_coverage)](https://codeclimate.com/github/oppia/oppia/test_coverage) [![Join the chat at https://gitter.im/oppia/oppia-chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/oppia/oppia-chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# [Oppia](https://www.oppia.org) [![Build Status](https://api.travis-ci.org/oppia/oppia.svg?branch=develop)](https://travis-ci.org/oppia/oppia) [![Code Coverage](https://api.codeclimate.com/v1/badges/eaa9dfe89c760481079d/test_coverage)](https://codeclimate.com/github/oppia/oppia/test_coverage) [![codecov](https://codecov.io/gh/oppia/oppia/branch/develop/graph/badge.svg)](https://codecov.io/gh/oppia/oppia) [![Join the chat at https://gitter.im/oppia/oppia-chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/oppia/oppia-chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, making it possible for students to learn by doing while getting feedback.

Expand Down
39 changes: 39 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: nearest
range: "80...100"

status:
project:
default: off
frontend:
flags: frontend
target: auto
threshold: 0
base: parent
backend:
flags: backend
target: auto
threshold: 0
base: parent
patch:
default: off
frontend:
flags: frontend
target: auto
threshold: 0
base: parent
backend:
flags: backend
target: auto
threshold: 0
base: parent

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

0 comments on commit 5335d8b

Please sign in to comment.