PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 9, 2022

[FIXED] Where is coverage.xml located in Codecov?

 October 09, 2022     code-coverage, codecov, continuous-integration, github, github-actions     No comments   

Issue

I use /home/runner/work/SIESTAstepper/SIESTAstepper/coverage.xml but I think the path is not correct. My report is not uploading on GitHub Actions.

Full file.


Solution

The coverage file is located at /home/runner/work/SIESTAstepper/SIESTAstepper/coverage.xml. In general, it is /home/runner/work/<project>/<project>/coverage.xml.

I solved it with the following code.

    - name: Generate Report
      run: |
        pip install codecov
        pip install pytest-cov
        pytest --cov=./ --cov-report=xml
        codecov
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v3.1.0
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        directory: ./coverage/reports/
        env_vars: OS,PYTHON
        files: /home/runner/work/SIESTAstepper/SIESTAstepper/coverage.xml
        flags: tests

Full code is here.



Answered By - Eftal Gezer
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing