Closed RobStallion closed 5 years ago
Screenshot taken from travis
==> Travis CI detected.
project root: .
Fixing merge commit SHA
--> token set from env
Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
--> No coverage report found.
Please visit http://docs.codecov.io/docs/supported-languages
Went to the following link mentioned in the above from travis... http://docs.codecov.io/docs/supported-languages
This link lists a bunch of supported languages, elixir being one of them. The elixir link.
Looked at the elixir link example and saw that they had defined a coveralls.json
command in there mix.exs
file
preferred_cli_env: [
"coveralls": :test,
"coveralls.html": :test,
"coveralls.json": :test,
],
I have added this to ours now...
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.json": :test,
all_tests: :test
]
@robstallion did you manage to get it working?
if not, please see: https://github.com/dwyl/phoenix-chat-example/blob/master/.travis.yml
@nelsonic Not yet no π + π
Checkout how itβs done in the Chat example: https://github.com/dwyl/phoenix-chat-example/
Looking at it now π
aliais from https://github.com/dwyl/phoenix-chat-example/
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
cover: ["coveralls.json"],
"cover.html": ["coveralls.html"]
]
end
(cover is the important one here)
.travis.yml from https://github.com/dwyl/phoenix-chat-example/
language: elixir
elixir: # Latest version of Elixir
- 1.7
addons: # ensure that Travis-CI provisions a DB for our test:
postgresql: '9.5'
env:
- MIX_ENV=test
script: # run the tests:
- mix cover
after_success:
- bash <(curl -s https://codecov.io/bash)
Added this to cid
script:
- mix coveralls.json
But still having the same issue
I really can't see what I am missing π
Added 25minute label because I feel like that's all it should have taken but I am doing something wrong and it has taken much longer
@RobStallion try adding the "Repository Upload Token" as a Travis-CI Environment Variable. (LMK if you are still stuck, we can do a quick Google Hangout to get it resolved ...)
@nelsonic I'm guessing that is this token you are talking about...
(have changed the token now)
which I have tried adding (was just putting that into a comment when you responded) with no luck.
A hangouts would be GREAT. Just let me know when you are free. (I have a really strong feeling I am going to be kicking myself forever over this)
@RobStallion standard "abv" hangouts link? (I'm on it now...)
What I always think when I'm debugging something ... π» Reduce the variables/unknowns until you have just the root cause of the problem. π
@RobStallion thanks for the hangout call to debug this. π» <> π»
I learned not to override the mix test
command. π
Looking forward to reading your writeup on this. π
Please consider adding a codecov.md
file to https://github.com/dwyl/learn-elixir π§
and linking to it from the main README.md
π
it doesn't have to take more than 1 x π
and will be a huge help to anyone else trying to replicate this in the near future. π
Thanks again! β¨
@nelsonic
@RobStallion thanks for the hangout call to debug this. π» <> π»
Thank you for the hangout call
Will do for the rest π
T25m
... 3 hours later ... π
TEARS OF JOY
@RobStallion - so what was the issue? It looks from your commit like the test aliases were breaking it? Can you explain this in any more detail?
Have been trying to add codecov badge but cannot seem to get it to work for some reason. Relates to this pr https://github.com/dwyl/cid/pull/25#issuecomment-458969612