Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added codecov #68

Merged
merged 24 commits into from
Mar 23, 2018
Merged

Added codecov #68

merged 24 commits into from
Mar 23, 2018

Conversation

ebreton
Copy link
Contributor

@ebreton ebreton commented Mar 19, 2018

  • added pytest-django (to be able to run tests through pytest)
  • added pytest-cov (to generate coverage report)
  • added CODECOV_TOKEN in Travis (to push the results to codecov)

Finally !! it works !

Here is a summary of the different issues I had on the way:

  • the tests needed to be run inside the container (because of requirements)
    • hence the docker-compose -f docker-compose-dev.yml exec web make test-travis in .travis.yml
  • the tests needed to be run within the full composition (because of tests using DB and selenium)
    • hence the make build-travis in .travis.yml that does a docker-compose up -d
  • codecov needs the git contex and can not be run inside our composition (eventhough it could run inside a container. But it fails with our composition since it does not take into account the environment variables that are defined at runtime as described in https://github.com/codecov/support/wiki/Testing-with-Docker. I have tried to docker-compose run web with the variable, but the run command does not properly link the created container with the other ones, wihch makes the tests fail)
    • hence the codecov in .travis.yml
  • but codecov needs access to the coverage.xml file resulting from the tests
    • hence the new volume /usr/src/app/coverage.xml in Dockerfile and in docker-compose-dev.yml

ebreton added 2 commits March 19, 2018 21:06
* master:
  Removed old doc_types
  doc_types from tind and 037__a => 336__a
  Added ind1=2 for 711__acd
@ebreton ebreton requested a review from jdelasoie March 19, 2018 20:34
@codecov-io
Copy link

codecov-io commented Mar 20, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@31cc10e). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #68   +/-   ##
=========================================
  Coverage          ?   49.58%           
=========================================
  Files             ?       46           
  Lines             ?     1081           
  Branches          ?        0           
=========================================
  Hits              ?      536           
  Misses            ?      545           
  Partials          ?        0
Impacted Files Coverage Δ
...oscience_exports/exports/pytests/test_fulltexts.py 100% <ø> (ø)
...nfoscience_exports/exports/pytests/test_authors.py 100% <ø> (ø)
infoscience_exports/exports/pytests/test_dates.py 100% <ø> (ø)
infoscience_exports/exports/versions.py 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31cc10e...b986f26. Read the comment docs.

@ebreton ebreton merged commit 67a65d4 into master Mar 23, 2018
@ebreton ebreton deleted the added-codecov branch March 27, 2018 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants