Skip to content

Move to codecov#133

Merged
chrisjsewell merged 11 commits intomasterfrom
converalls-action
Apr 6, 2020
Merged

Move to codecov#133
chrisjsewell merged 11 commits intomasterfrom
converalls-action

Conversation

@chrisjsewell
Copy link
Copy Markdown
Member

@chrisjsewell chrisjsewell commented Apr 6, 2020

Coveralls doesn't support GitHub actions properly for forked PRs 😒 coverallsapp/github-action#30

https://github.com/codecov/codecov-action

@chrisjsewell chrisjsewell changed the title use coverallsapp/github-action Move to codecov Apr 6, 2020
@chrisjsewell
Copy link
Copy Markdown
Member Author

Feeeeeeeck!!!

I can't get this damn thing to work; all you need to do is output the coverage report as XML:

$ pytest --cov=myst_nb --cov-report=xml
================================================================================================= test session starts ==================================================================================================
platform darwin -- Python 3.7.6, pytest-5.4.1, py-1.8.1, pluggy-0.13.0
rootdir: /Users/cjs14/GitHub/MyST-NB-actual, inifile: pytest.ini
plugins: cov-2.8.1, datadir-1.3.1, regressions-2.0.0
collected 33 items                                                                                                                                                                                                     

tests/test_execute.py ...........                                                                                                                                                                                [ 33%]
tests/test_glue.py ......                                                                                                                                                                                        [ 51%]
tests/test_nb_render.py ...........                                                                                                                                                                              [ 84%]
tests/test_parser.py ..                                                                                                                                                                                          [ 90%]
tests/test_text_based.py .                                                                                                                                                                                       [ 93%]
tests/test_transform.py ..                                                                                                                                                                                       [100%]

---------- coverage: platform darwin, python 3.7.6-final-0 -----------
Coverage XML written to file coverage.xml

But then coverage.xml is nowhere to be found!? It's the same with --cov-report=html, and I know for certain that I have had that working before, so it must be something to do with the current package versions or something?

@chrisjsewell
Copy link
Copy Markdown
Member Author

Also this is working fine in my aiida development environment:

$ conda list
...
coverage                  4.5.4            py37h0b31af3_0    conda-forge
pytest                    5.4.1            py37hc8dfbb8_0    conda-forge
pytest-cov                2.8.1                      py_0    conda-forge

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 6, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@b64cc30). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #133   +/-   ##
=========================================
  Coverage          ?   83.83%           
=========================================
  Files             ?        9           
  Lines             ?      804           
  Branches          ?        0           
=========================================
  Hits              ?      674           
  Misses            ?      130           
  Partials          ?        0           
Flag Coverage Δ
#pytests 83.83% <0.00%> (?)

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 b64cc30...b9ca8f3. Read the comment docs.

@chrisjsewell
Copy link
Copy Markdown
Member Author

Ok! for some reason the tests/conftest.py::check_nbs fixture breaks pytest-cov's cov-report outputting. I notice that multiple .coverage files are being created, then merged, so I imagine its something to do with this. Anyway, I've added coverage xml after pytest and that seems to do the job

@chrisjsewell chrisjsewell merged commit f543008 into master Apr 6, 2020
@chrisjsewell chrisjsewell deleted the converalls-action branch April 6, 2020 20:24
phaustin pushed a commit to phaustin/MyST-NB that referenced this pull request Apr 7, 2020
phaustin pushed a commit to phaustin/MyST-NB that referenced this pull request Apr 10, 2020
@AndreMiras
Copy link
Copy Markdown

FYI I got it working and recently wrote a GitHub Action for it https://github.com/marketplace/actions/coveralls-python

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.

3 participants