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

Coverage upload does not work in CI #7

Open
mraspaud opened this issue Jul 18, 2022 · 0 comments
Open

Coverage upload does not work in CI #7

mraspaud opened this issue Jul 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mraspaud
Copy link
Member

The coverage reported atm is 0%.

Sample output of the github actions run:

Run pytest --cov=pytroll-monitor pytroll_monitor/tests --cov-report=xml
============================= test session starts ==============================
platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/runner/work/pytroll-monitor/pytroll-monitor
plugins: cov-3.0.0, requests-mock-1.9.3
collected 4 items
pytroll_monitor/tests/test_loggers.py .                                  [ 25%]
/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/coverage/inorout.py:519: CoverageWarning: Module pytroll-monitor was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/coverage/control.py:794: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")
/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pytest_cov/plugin.py:308: CovReportWarning: Failed to generate report: No data to report.
  warnings.warn(CovReportWarning(message))
pytroll_monitor/tests/test_op5.py ...                                    [100%]WARNING: Failed to generate report: No data to report.
---------- coverage: platform linux, python 3.10.5-final-0 -----------
============================== 4 passed in 0.13s ===============================
0s
Run codecov/codecov-action@v1
/usr/bin/bash codecov.sh -n  -F unittests -Q github-action-v1.5.2 -e OS,PYTHON_VERSION,UNSTABLE -f ./coverage.xml
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-1.0.3
==> git version 2.37.0 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
    Env vars used:
      -> GITHUB_ACTIONS:    true
      -> GITHUB_HEAD_REF:   
      -> GITHUB_REF:        refs/tags/v0.2.0
      -> GITHUB_REPOSITORY: pytroll/pytroll-monitor
      -> GITHUB_RUN_ID:     2688943750
      -> GITHUB_SHA:        b38bb147407c873b7223f036f3c0ac34dee7ac74
      -> GITHUB_WORKFLOW:   CI
project root: .
Yaml not found, that's ok! Learn more athttp://docs.codecov.io/docs/codecov-yaml
-> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
+ OS
+ PYTHON_VERSION
+ UNSTABLE
==> Reading reports
- file not found at ./coverage.xml
--> No coverage data found.
    Please visit http://docs.codecov.io/docs/supported-languages
    search for your projects language to learn how to collect reports.
@mraspaud mraspaud added the bug Something isn't working label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant