Comments (12)
I'm inclined to agree with you on this. Curious what others think.
from excoveralls.
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.
Any movement on this? Our test time is doubled because of this, and we have quite a bit of tests.
from excoveralls.
@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.
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.
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.
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.
mix test
task exits with1
return code when there's test failure and0
when it's success. I think this behavior corresponds to the following area of elixir implementation.- It seems the logic is when
failures > 0
is satisfied, theKernel.exit
shutdown processes with exit code1
. But, the callback function for coverage tools (following line) does not get test information and cannot directly check similar condition. - The callback function in excoveralls side is the following.
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.
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.
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.
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.
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.
Thanks for the update.
from excoveralls.
Related Issues (20)
- How to find out by which test selected line is covered by?
- Coveralls is not picking all my files HOT 1
- Coveralls errors out HOT 3
- Github actions fail on scheduled workflows
- Cannot specify subdir with circle
- Is it possible to include HEEX files in the coverage?
- Support --warnings-as-errors option HOT 3
- Reports different results at an umbrella level vs in-app level
- Is there a way to post coverage from Github Actions in parallel mode? HOT 3
- don't ignore `min_coverage` in `mix coveralls.json` HOT 4
- Coveralls reporting does not understand slots
- Story: Please add totals at the bottom of the report for LINES, RELEVANT and MISSED
- Cobertura error when protocols and implementations in codebase HOT 1
- Incompatibility between excoveralls and meck? HOT 4
- Umbrella run ignores config json in root HOT 5
- Protocols fail to consolidate using ExCoveralls
- Excoveralls minimum_coverage conflicts with new Elixir changes. Result: Error: Process completed with exit code 3.
- "function ExCoveralls.start/2 is undefined" HOT 3
- Warning in build, CAStore
- Is it possible to export in multiple formats by running the tests once?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excoveralls.