Comments (6)
Hey! Thank you for reporting this issue. I will be working on it soon, but just to not block you, I can suggest the following workaround:
- Run
coverage xml
before reporting the coverage. This should convert the.coverage
file (which is an SQLite3 database file) intocoverage.xml
(which is a Cobertura XML report). - Specify
file: coverage.xml
option forcoverallsapp/github-action
action.
I'll be glad to help if you have any questions.
from github-action.
Thanks @mrexox for pointing that out , in my local this was not happening turns out i needed to add a init.py in my test folder if i use pytest-cov plugin now it works thanks
thanks again for quick response and help!
from github-action.
Hi @mrexox ,
I am doing a PoC in my python project to learn how to use coverall but it seems it keeps on giving me 0% coverage even if is convert .coverage file to coverage.xml, can you point me in the right direction on what i might be doing wrong here?
- name: manually triggered tests
run: |
pytest tests/ --cov=indi_dummy --cov-report lcov
coverage xml
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: true
file: coverage.xml
path-to-lcov: ./coverage.lcov
ref: indiVar0508/Dummy#23
even after push i merge and push event triggers on master branch coverage is still coming 0% :/
Thanks!
from github-action.
Hey! I've tried to run the tests locally but I see the same results - no hits for any line. Not sure why it is that. Maybe it is related to some configuration?
There is also a warning in the CI that No data was collected
tests/test_main.py .... [ 40%]
/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/coverage/control.py:801: CoverageWarning: No data was collected. (no-data-collected)
self._warn("No data was collected.", slug="no-data-collected")
tests/test_math_code.py ...... [100%]
---------- coverage: platform linux, python 3.8.[17](https://github.com/indiVar0508/Dummy/actions/runs/5679087475/job/15390585034#step:5:18)-final-0 -----------
Coverage LCOV written to file coverage.lcov
============================== 10 passed in 0.10s ==============================
Wrote XML report to coverage.xml
Sorry, I am not familiar with Pytest, so I can't say why the results are so 😕
from github-action.
Any updates on this? We are having the same issue
from github-action.
@ZoranPandovski, we are still struggling with a fix for this bug. There is a workaround: https://github.com/coverallsapp/coverage-reporter#pytest-cov-test_tube-beta. Please, do the following:
- Convert the
.coverage
SQLite3 report into XML report withcoverage xml
command - Specify the XML file with
file: coverage.xml
option
The problem is - we can't make Crystal link SQLite3 library statically for Windows binary. We are still looking for a solution. It may probably take a long time.
from github-action.
Related Issues (20)
- Empty lcov files break build HOT 1
- Mono repo + Windows absolute paths? HOT 3
- Ability to select version of coverage-reporter HOT 4
- Invalid memory access (C0000005) at address 0x0 HOT 1
- Python relevant lines not properly computed in the coverage HOT 2
- Coveralls does not process xml generated by pytest-cov HOT 1
- Coveralls fails with Windows runner HOT 3
- Github Actions Coveralls failing to upload multiple coverage files for ruby parallel specs HOT 7
- Cannot find coverage file HOT 2
- Need help to understand the ids/numbers when upload for parallel jobs/builds. HOT 17
- Having Issues Bad Response in GitHub Action CI HOT 4
- Change to pwsh on windows runner breaks `file` option HOT 1
- It looks like `coveralls-api-result` is no longer used HOT 1
- coveralls doesn't recognize relevant lines, says coverage 100% HOT 1
- Pull request across forks shows 0 of 0 changed or added relevant lines in 0 files are covered HOT 1
- v2 sha256sum: unrecognized option: check HOT 1
- Support `git` workspace directory different from `GITHUB_WORKSPACE`.
- Update to Node 20 HOT 5
- Not working on Mac OS HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-action.