Combined coverage CI issue: nyc merge reports yields an empty coverage.json file in CI #22828
              
                Unanswered
              
          
                  
                    
                      muratkeremozcan
                    
                  
                
                  asked this question in
                Questions and Help
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
3-way combined coverage is working really well locally (CyE2e + CyCT + Jest)
Local reproduction:
git clone https://github.com/muratkeremozcan/react-hooks-in-action-with-cypress.git cd react-hooks-in-action-with-cypress yarn installRun the component & e2e tests in any order, the coverage combines out of the box in
coverage-cyfolder:Run the Jest test:
yarn testCombine the coverage into combined-coverage folder:
Problem:
nyc mergecreates an emptycoverage.jsonfile when merging Cypress coverage results in CI.The CI repeats the local workflow, in a more imperative way, and outputs it step by step.
Downloading the artifacts to a local folder and running the
nyc mergecommand works perfectly fine. The issue is doing the same in CI.Step by step CI output
video demo and issue reproduction
Are you aware of any workarounds? Can you spot any mistakes? Please let me know.
If this does not work, the only way forward with combined coverage in CI is by using the the codeCov service, which is the next item in this PR.
Beta Was this translation helpful? Give feedback.
All reactions