GithubHelp home page GithubHelp logo

Comments (12)

joshsmith avatar joshsmith commented on July 20, 2024

I'm inclined to agree with you on this. Curious what others think.

from excoveralls.

zachdaniel avatar zachdaniel commented on July 20, 2024

Currently in our CI we run tests once, and then run them again to send coverage, which is a bit of a waste of time.

from excoveralls.

zachdaniel avatar zachdaniel commented on July 20, 2024

Any movement on this? Our test time is doubled because of this, and we have quite a bit of tests.

from excoveralls.

joshsmith avatar joshsmith commented on July 20, 2024

@parroty I don't have time to look into this right now, unfortunately. Do you or does someone else here have a chance?

from excoveralls.

asummers avatar asummers commented on July 20, 2024

Just curious if there's been any movement on this. Looking through the code, it seems the mix task would have to capture the error status from https://github.com/parroty/excoveralls/blob/master/lib/mix/tasks.ex#L53 and then after the if block below, raise if failure?

from excoveralls.

asummers avatar asummers commented on July 20, 2024

After thinking about it for a little bit, there should be an on/off flag to disable this behavior. Something like: mix coveralls --exit-status-ignore-result would always return positive behavior. However since that's existing behavior, it could be flipped to mix coveralls --status-as-exit-code or something, in an effort to not break existing behavior in people's builds.

from excoveralls.

parroty avatar parroty commented on July 20, 2024

Thanks for the follow-up. I'm starting to check around this item, and having a on/off flag sounds nice (mix flag mentioned can be one option, but maybe it's good to have in coveralls.json setting file, assuming this setting is more static preference?).

However, what I'm looking/wondering is how to identify the test failure (exit code) before posting json file.

I'll check some more, but it's great if anyone have any ideas/insights on this part.

  • System.at_exit callback seems to have access to the exit code, but I assume it's too late timing to take json-post action.

from excoveralls.

zachdaniel avatar zachdaniel commented on July 20, 2024

I'm not sure if it really is important not to push coverage if the tests fail. Would it be an easier task to add an option to just to carry the test exit code through? For us, that would be 99℅ of what we need.

from excoveralls.

parroty avatar parroty commented on July 20, 2024

I think the mix coveralls tasks carry the test exit code (if tests fail, it exits with code 1).
I think I'm misunderstanding some of your intention. Can we get some more description about how the tests are run? (like how CI tool is configured).

$ mix coveralls.post
....

  1) test fails (ExCoveralls.CircleTest)
     test/circle_test.exs:33
     Assertion with == failed
     code:  1 == 2
     left:  1
     right: 2
     stacktrace:
       test/circle_test.exs:34: (test)

..

Finished in 3.8 seconds
108 tests, 1 failure

...

Successfully uploaded the report to 'https://coveralls.io'.
$ echo $?
1
$ mix coveralls.post
......

Finished in 3.8 seconds
107 tests, 0 failures

...

Successfully uploaded the report to 'https://coveralls.io'.

$ echo $?
0

from excoveralls.

zachdaniel avatar zachdaniel commented on July 20, 2024

Very interesting. If this is, in fact, a mistake on our end, then our builds have been twice as long for no reason lol. Thats the ideal. We'll investigate and get back to you. Thanks so much for your help!

from excoveralls.

zachdaniel avatar zachdaniel commented on July 20, 2024

Looks like the issue was on our end. We seem to have been ignoring the exit status somehow. Sorry for wasting your time, but thank for all of the assistance.

from excoveralls.

parroty avatar parroty commented on July 20, 2024

Thanks for the update.

from excoveralls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.