Bounties-Network / BountiesAPI

The caching layer of the Bounties Network
MIT License
43 stars 28 forks source link

Set up Code Coverage configuration #22

Closed villanuevawill closed 6 years ago

villanuevawill commented 6 years ago

Requirements

As an example, code coverage is already setup within the django application. However, the configuration needs to be fixed as it is not covering the right files. To run it, just try docker-compose exec bounties_api python manage.py test --with-coverage

Definition of Done

Reviewers

Myself and @mbeylin

Review Requirements

gitcoinbot commented 6 years ago

This issue now has a funding of 0.08 ETH (41.12 USD @ $513.94/ETH) attached to it.

gitcoinbot commented 6 years ago

Work has been started on the 0.08 ETH (51.24 USD @ $640.44/ETH) funding by:

  1. @zoek1

    Please work together and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

    On the above list? Please leave a comment to let the funder (@villanuevawill00aa9e3612734131) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

zoek1 commented 6 years ago

@villanuevawill are you planing integrate the tests with travis or another services?

zoek1 commented 6 years ago

Also i supposed that the problem with not covering the right files is caused by the following error?

System check identified 1 issue (0 silenced).
E
======================================================================
ERROR: std_bounties.tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: std_bounties.tests
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/code/std_bounties/tests.py", line 7, in <module>
    from bounties_api.std_bounties.client_helpers import narrower
ModuleNotFoundError: No module named 'bounties_api'

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
Destroying test database for alias 'default'...
villanuevawill commented 6 years ago

@zoek1 - yep, I do plan on adding circle soon.

villanuevawill commented 6 years ago

@zoek1 I did not get that error... hmmm I just run it with the command above... Did you rebuild?

zoek1 commented 6 years ago

@villanuevawill yep, i switched to codecov branch and executed the command:

$ docker-compose exec bounties_api python manage.py test --with-coverage

zoek1 commented 6 years ago

Never mind, my fault. :man_facepalming:

zoek1 commented 6 years ago

do you have a prefered option to code coverage in js or istanbul is ok?

zoek1 commented 6 years ago

@villanuevawill can you review the PR #25? Please :smiley:

gitcoinbot commented 6 years ago

Work for 0.08 ETH (48.5 USD @ $606.25/ETH) has been submitted by:

  1. @zoek1

    Submitters, please leave a comment to let the funder (@villanuevawill00aa9e3612734131) (and the other parties involved) that you've submitted you work. If you don't leave a comment, the funder may expire your submission at their discretion.

villanuevawill commented 6 years ago

@zoek1 istanbul is great!

gitcoinbot commented 6 years ago

The funding of 0.08 ETH (51.24 USD @ $640.44/ETH) attached to this issue has been approved & issued to @zoek1.