Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Pipe - cleaned up and merged with master #92

Merged
merged 17 commits into from
Apr 2, 2019

Conversation

dotnetCarpenter
Copy link
Contributor

Support for piped coverage reports via --pipe or -l parameter to codecov.

See previous #30 PR, which had an issue with timeouts on slow CI. This PR uses parameters instead of a timer, so this should not be an issue.

@dotnetCarpenter dotnetCarpenter mentioned this pull request Mar 13, 2018
Closed
@codecov
Copy link

codecov bot commented Mar 13, 2018

Codecov Report

Merging #92 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
+ Coverage   87.88%   88.01%   +0.12%     
==========================================
  Files          18       18              
  Lines         289      292       +3     
  Branches       69       70       +1     
==========================================
+ Hits          254      257       +3     
  Misses         35       35
Impacted Files Coverage Δ
lib/codecov.js 80.34% <100%> (+0.34%) ⬆️

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 625807c...145cb46. Read the comment docs.

@dotnetCarpenter
Copy link
Contributor Author

Seems like the codecov/patch check is not working. The code coverage is going up but the target is not hit. Maybe a configuration mistake?

There is something else wrong with the tests - not mine, but in general.
"Codecov can auto detect reports"
"Codecov can detect .bowerrc without directory"
Locally, they expect "coverage.json" but on travis they expect "example.coverage.txt". Seems that res.files[0] is changing depending if run locally (on linux) or on travis. Should not be because of node version since I'm running node v8.9.4 and one of the VM's on travis is also running version 8.

@dotnetCarpenter
Copy link
Contributor Author

@eddiemoore it would be nice to see some signals from your guys, so this PR is not just closed as #30 was.

@eddiemoore
Copy link
Collaborator

@dotnetCarpenter yeah sorry I'm a maintainer and not full time codecov staff. Haven't had much time to work on it for quite a while.

Locally, they expect "coverage.json" but on travis they expect "example.coverage.txt"

yeah I notice this too. Most of the tests were written a long time ago. Not exactly sure why it's like that.

Code looks ok to me. Just need to fix the merge conflicts

@dotnetCarpenter
Copy link
Contributor Author

@eddiemoore I will take a look whenever I get time. Would it be possible to have all tests pass before I merge in from master again? There will probably be some conflicts and as long as the tests are failing I can not be sure I am not the cause of it..

@dotnetCarpenter
Copy link
Contributor Author

Currently two tests are failing on master:

  1) Codecov can auto detect reports:

      Error: expected 'coverage.json' to sort of equal 'example.coverage.txt'
      + expected - actual

      -coverage.json
      +example.coverage.txt

      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.eql (node_modules/expect.js/index.js:230:10)
      at Context.<anonymous> (test/index.js:43:56)

  2) Codecov can detect .bowerrc without directory:

      Error: expected 'coverage.json' to sort of equal 'example.coverage.txt'
      + expected - actual

      -coverage.json
      +example.coverage.txt

      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.eql (node_modules/expect.js/index.js:230:10)
      at Context.<anonymous> (test/index.js:76:56)

@eddiemoore
Copy link
Collaborator

@dotnetCarpenter can you pull the latest changes? All tests passing fine on local now for me.

@dotnetCarpenter
Copy link
Contributor Author

@eddiemoore The main issue was that it the tests are passing locally but not in travis.
However, when I pull in the latest changes (mainly to fix conflicts) then my test fails and I'm struggling to remember how the test is suppose to work..
I'll dig around a little more and see if I can figure it out

@dotnetCarpenter
Copy link
Contributor Author

@eddiemoore Looks good! Please check the documentation - seem that I mixed the --pipe or -l flag with the token documentation.

README.md Outdated
@@ -36,6 +36,8 @@ Repo tokens are necessary to distinguish your repository from others. You can fi
export CODECOV_TOKEN=":uuid-repo-token"
# or
./node_modules/.bin/codecov --token=:token
# or
nyc report --reporter=text-lcov | ./node_modules/.bin/codecov --pipe

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be:

./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/codecov --pipe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. that is correct if you invoke codecov from the terminal. But if you set it in package.json script section, then you should not specify the path. But since all of the examples are written as invoked from the terminal, I will change it.

@eddiemoore
Copy link
Collaborator

@dotnetCarpenter just need to fix the merge conflicts and update the docs as @sindresorhus pointed out.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@023d204). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #92   +/-   ##
=========================================
  Coverage          ?   88.01%           
=========================================
  Files             ?       18           
  Lines             ?      292           
  Branches          ?       70           
=========================================
  Hits              ?      257           
  Misses            ?       35           
  Partials          ?        0
Impacted Files Coverage Δ
lib/codecov.js 80.34% <100%> (ø)

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 023d204...5f2d0e6. Read the comment docs.

@dotnetCarpenter
Copy link
Contributor Author

@eddiemoore I'm getting 166 eslint errors when I run npm test locally.

The offending files are coverage/lcov-report/sorter.js and coverage/lcov-report/prettify.js.

I feel I've spend the majority of time with this PR, fixing merge conflicts and errors in tests. It's been a long time since I've used codecov and do not have a professional interest in this patch anymore.
That being said, I have a personal interest in getting my work accepted but I don't want to invest more time in this patch at this time.

Can you please resolve what remains?

@Ayplow Ayplow mentioned this pull request Oct 23, 2018
@eddiemoore eddiemoore merged commit 5f2d0e6 into codecov:master Apr 2, 2019
@dotnetCarpenter dotnetCarpenter deleted the pipe branch April 2, 2019 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants