-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
feat(api): support officially documented generic CI env vars (#299) #300
Conversation
f07fe69
to
fba8351
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @abravalheri -- thanks for the contribution and sorry I've fallen so far behind on reviews. Really appreciate the work put in here to track down descriptions for each of these!
Overall this LGTM, just a question around a difference between your implementation and the ruby one.
Thank you very much for the review @TheKevJames. I tried to reply to your question with some information, but if you prefer to make the implementation more similar to the Ruby one, please let me know, I can also do that. |
The official docs for Coveralls define a set of generic environment variables that once defined should support any CI environment: https://docs.coveralls.io/supported-ci-services (bottom of the page). The changes implemented in this PR attempt to read those variables but allows the values to be overwritten by any CI-specific configuration currently supported. They were also inspired by the official client (coveralls-ruby - lib/coveralls/configuration.rb - set_standard_service_params_for_generic_ci).
fba8351
to
e4486d6
Compare
Hi @TheKevJames, I (hopefully) improved the docs about Please let me know if any other changes are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abravalheri perfect, the updated docs look great. Thanks again for the contribution!
…ames#299) (TheKevJames#300) The official docs for Coveralls define a set of generic environment variables that once defined should support any CI environment: https://docs.coveralls.io/supported-ci-services (bottom of the page). The changes implemented in this PR attempt to read those variables but allows the values to be overwritten by any CI-specific configuration currently supported. They were also inspired by the official client (coveralls-ruby - lib/coveralls/configuration.rb - set_standard_service_params_for_generic_ci).
This PR is related to #299 and #256.
The official docs for Coveralls define a set of generic environment variables that once defined should support any CI environment: https://docs.coveralls.io/supported-ci-services (bottom of the page).
The changes implemented in this PR attempt to read those variables but allows the values to be overwritten by any CI-specific configuration currently supported. They were also inspired by the official client (coveralls-ruby - lib/coveralls/configuration.rb -set_standard_service_params_for_generic_ci).
On top of the automated tox and pre-commit, I also did a manual test (to make sure no coveralls API error was introduced) following the steps described bellow:
coveralls debug
in an existing project/CI and copied the printed JSON stringload_config_generic_ci_environment
https://coveralls.io/api/v1/jobs
, using the requests library, using:The
POST
request was successful (200 return code), and the outcome can be observed in https://coveralls.io/builds/40277688, which seem to indicate that the changes do not introduce any non-supported payload key for the coveralls HTTP API (which was already expected since it mimics the official Ruby client implementation).Please let me know of any feedback, I can also implement some changes if there is something that is not adequate.
A final observation about the changes in the docs: although the official webpage does not describe the meaning of each
CI_
environment variable, I managed to create some useful description by inspect both Ruby and Python clients and cross-correlating the environment variables for other services according to their documentation (e.g. Travis, Circle, GitLab, GitHub, Semaphore).