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

Remove coveralls, add codecov #5954

Merged
merged 10 commits into from
Jan 2, 2020
Merged

Remove coveralls, add codecov #5954

merged 10 commits into from
Jan 2, 2020

Conversation

kaustubh-nair
Copy link
Member

@kaustubh-nair kaustubh-nair commented Jun 27, 2019

Partially fixes #5931

@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

Merging #5954 into master will increase coverage by 6.08%.
The diff coverage is 81.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5954      +/-   ##
==========================================
+ Coverage   74.67%   80.75%   +6.08%     
==========================================
  Files          89       97       +8     
  Lines        5402     5561     +159     
==========================================
+ Hits         4034     4491     +457     
+ Misses       1368     1070     -298
Impacted Files Coverage Δ
app/controllers/questions_controller.rb 90.78% <ø> (+9.21%) ⬆️
app/mailers/admin_mailer.rb 100% <ø> (ø) ⬆️
app/mailers/node_mailer.rb 100% <ø> (ø) ⬆️
app/helpers/search_helper.rb 100% <ø> (ø) ⬆️
app/controllers/comment_controller.rb 87.23% <ø> (+14.89%) ⬆️
app/models/node_tag.rb 100% <100%> (ø) ⬆️
app/models/doc_result.rb 100% <100%> (ø) ⬆️
app/controllers/subscription_controller.rb 57% <100%> (+3.39%) ⬆️
app/controllers/application_controller.rb 92.37% <100%> (+8.73%) ⬆️
app/helpers/csvfiles_helper.rb 100% <100%> (ø)
... and 57 more

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 60cbdaa...38e06f8. Read the comment docs.

@@ -20,8 +20,6 @@ namespace :test do

desc "Run rails and teaspoon tests"
task :all => :environment do
require 'coveralls/rake/task'
Coveralls::RakeTask.new
if ENV['GENERATE_REPORT'] == 'true'
require 'ci/reporter/rake/test_unit'
Rake::Task["ci:setup:testunit"].execute
Copy link
Member Author

Choose a reason for hiding this comment

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

@jywarren need some info on these tasks

.travis.yml Outdated
# - if [ $TASK != "rake test:all" ]; then
# echo -e '<?xml version="1.0" encoding="UTF-8"?>' > output.xml;
# tail -n +2 -q ./test/reports/TEST*.xml >> output.xml;
# fi
Copy link
Member Author

Choose a reason for hiding this comment

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

@jywarren @publiclab/reviewers What are these lines supposed to be doing? I'm not sure if they are related to coveralls or not

Copy link
Member

Choose a reason for hiding this comment

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

They're related to Coveralls, they generate the XML to be pushed to Coveralls. You can remove those.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure about this. Dangerbot uses the xml too I think.

Copy link
Member

Choose a reason for hiding this comment

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

These were intended to search through standard formatted JUnit test reports and copy them into the Dangerbot comment in the PR. They broke some time ago, but were a really nice way to help people see where errors were occurring. I'd like to leave them in so we can fix them again some day!

@kaustubh-nair
Copy link
Member Author

I've got codecov setup but the build is failing, because of some errors in the Rakefile I think
@jywarren Can you have a look?

@jywarren
Copy link
Member

jywarren commented Jul 9, 2019

Ah, i think you'll have to remove Coveralls.push -


rake aborted!
Don't know how to build task 'coveralls:push' (See the list of available tasks with `rake --tasks`)
/app/Rakefile:29:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => test:all
(See full trace by running task with --trace)
The command "docker-compose exec web bash -c "GENERATE_REPORT=true $TASK"" exited with 1.

Probably in the rakefile, line 29?

@kaustubh-nair
Copy link
Member Author

Not sure why project check is turning up even though it's off. I guess it should be fine after merging?
@jywarren This is ready
Thanks!

@kaustubh-nair
Copy link
Member Author

@jywarren On second thought, let's not merge this till I fix the inconsistencies on mapknitter. I might have to change the reporter

@kaustubh-nair
Copy link
Member Author

@publiclab/reviewers Any idea why a unit test is failing? I haven't made changes to the code. That's weird. 😕

@grvsachdeva
Copy link
Member

For sure, the error is not related to your code. I have restarted the job.

@kaustubh-nair
Copy link
Member Author

We're facing the same coverage drop here too :/
I'm starting to think this a bug with Codecov itself and not an issue on our side

@jywarren
Copy link
Member

jywarren commented Aug 3, 2019

Is the coverage drop consistent? I.e. if it's not related to code, are we seeing a non-deterministic behavior, perhaps resulting from the order of completion of tests, or from other branch tests getting mixed up somehow? Or is it showing the same exact drop each time this is run?

Can you open an issue on CodeCov's tracker and link between here and there to try to get some help on this? Thank you!

* typo replace omment with comment

* Update blog.css

* Update .travis.yml

* Update .travis.yml

* add codecov branch to travis for debugging
@jywarren
Copy link
Member

Let's see how this does and then we can resolve conflicts and merge!

@jywarren
Copy link
Member

jywarren commented Jan 1, 2020

@Uzay-G can you see why the tests didn't pass here? https://travis-ci.org/publiclab/plots2/builds/630645697?utm_source=github_status&utm_medium=notification

I restarted it after resolving conflicts but not sure why it had failed before. I hope it doesn't this time!

@Uzay-G
Copy link
Member

Uzay-G commented Jan 1, 2020

I looked at it but don't understand why it bugged out then and worked now although nothing was changed. The error just says Mysql2::Error::ConnectionError: Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020

Wow! This would increase our coverage to 80% then... Merging #5954 into master will increase coverage by 6.08%.

This would be awesome. Do you think it's ready to merge then?

From the chatroom:

@Uzay-G will try to take a look. it could just need to be restarted by closing and reopening... could be a random timeout

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020

Let's do this!!!

@jywarren jywarren merged commit 00f071e into master Jan 2, 2020
@jywarren
Copy link
Member

jywarren commented Jan 2, 2020

🎉 🎉 🎉 🎉 🎉

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Nice! Yeah I think it's ready and it should work! 🎈 👍

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Ah! I don't understand why but for some reason the codecov bot is not commenting on new pull requests. This issue is really a mystery...

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Ok actually it worked but there is a problem. See here for what it did: #7086. It returns the error: exclamation No coverage uploaded for pull request base (master@e16e4bc).
I will try to fix it

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

This is the error:
codecov

I think we need to edit the settings on the codecov dashboard so that the base is more recent maybe??
I'm not sure because I don't have permission to see the settings

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020 via email

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Yeah it needs to compare to the base. What is it comparing to right now?
I don't think it will work with a static version

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020 via email

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

I don't think it's because of the pull request changes because all of the pull requests have the same message. The problem is that it is comparing to a commit that doesn't have a codecov report so it can't compare the changes.

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

This page might help us: https://docs.codecov.io/docs/comparing-commits

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

I think I know the problem and will try to fix it when I come back

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020 via email

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020

Hi @Uzay-G (ref #5954) this is a good example PR: #6957

❗️ No coverage uploaded for pull request base (master@b701668). Click here to learn what that means.

image

Does this mean that as soon as we merge another PR to master, it'll have a recorded coverage base for that commit?

OH! You know what? What if squashing and merging is causing a new commit hash to be generated, and so we have to be sure tests are run on that too so that it files a coverage report for the newly generated squashed commit???

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Yeah maybe we need to merge one to have a base with a coverage report. I'm not sure what you mean by the second part bur merging one might be a good idea.

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

We could merge #7076 to try it out

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020

OK i merged #7089

Let's look again. If it doesn't work, we can try merging WITHOUT squashing to test if that does not generate a different commit and so the coverage would be saved???

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

It worked here: #5724 (comment). I think the issue is resolved!

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Since you merged the pr, codecov is working. Yay we fixed it! 🎂

@jywarren
Copy link
Member

jywarren commented Jan 2, 2020 via email

@Uzay-G
Copy link
Member

Uzay-G commented Jan 2, 2020

Yeah I agree

Tlazypanda pushed a commit to Tlazypanda/plots2 that referenced this pull request Jan 14, 2020
* Remove coveralls, add codecov

* Add env variable

* Comment reporting lines

* Change env variable

* Remove coveralls from rake file

* Fix travis and rakefile

* Remove project for codecov

* Remove old reports before running

* typo replace omment with comment (publiclab#7042)

* typo replace omment with comment

* Update blog.css

* Update .travis.yml

* Update .travis.yml

* add codecov branch to travis for debugging

Co-authored-by: Uzay-G <[email protected]>
Co-authored-by: Jeffrey Warren <[email protected]>
vinitshahdeo pushed a commit to vinitshahdeo/plots2 that referenced this pull request Feb 1, 2020
* Remove coveralls, add codecov

* Add env variable

* Comment reporting lines

* Change env variable

* Remove coveralls from rake file

* Fix travis and rakefile

* Remove project for codecov

* Remove old reports before running

* typo replace omment with comment (publiclab#7042)

* typo replace omment with comment

* Update blog.css

* Update .travis.yml

* Update .travis.yml

* add codecov branch to travis for debugging

Co-authored-by: Uzay-G <[email protected]>
Co-authored-by: Jeffrey Warren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallelized Travis runs split test, coverage reports
5 participants