-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
Fix Coveralls branch info and update README badges #4831
Conversation
goveralls was not able to detect the current branch since letsencrypt#4735. Instead of figuring out which variables are needed for it to work correctly, this commit just propagates all environment variables with the TRAVIS_ prefix. Also updates the badges in the readme file. The badge wasn't update when we migrated to travis-ci.com. The travis-ci.org address now just has an annoying redirect page which requires you to click a link to go to the new page on travis-ci.com. The new badge just takes you there directly.
@@ -44,4 +44,12 @@ install: | |||
- docker-compose pull | |||
|
|||
script: | |||
- docker-compose run --use-aliases -e BOULDER_CONFIG_DIR="${BOULDER_CONFIG_DIR}" -e RUN="${RUN}" -e TRAVIS="${TRAVIS}" -e TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST}" -e COVERALLS_TOKEN="${COVERALLS_TOKEN}" ${CONTAINER:-boulder} ./test.sh | |||
- >- |
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.
What does the >-
syntax do?
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.
It's a folded scalar, it collapses all lines into a single one: https://yaml-multiline.info/
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.
Neat!
- docker-compose run --use-aliases -e BOULDER_CONFIG_DIR="${BOULDER_CONFIG_DIR}" -e RUN="${RUN}" -e TRAVIS="${TRAVIS}" -e TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST}" -e COVERALLS_TOKEN="${COVERALLS_TOKEN}" ${CONTAINER:-boulder} ./test.sh | ||
- >- | ||
docker-compose run --use-aliases | ||
-e BOULDER_CONFIG_DIR |
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.
Ooh this is nice that you can pass just the name for convenience. I like it!
@@ -61,7 +61,7 @@ function run_test_coverage() { | |||
# We don't use the run function here because sometimes goveralls fails to | |||
# contact the server and exits with non-zero status, but we don't want to | |||
# treat that as a failure. | |||
goveralls -v -coverprofile=gover.coverprofile -service=travis-ci |
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.
Is this travis-ci
-> travis-pro
change to cover the migration to travis.com? I don't actually know what travis-pro is. Could you document the answer in the PR description? Also, reminder to update the description to reflect the latest changes.
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.
Ah, yes, this is meant to correspond to travis-ci.com, I forgot to update the description with this. On a second look though I'm not sure it actually does anything relevant. It's documented in https://docs.coveralls.io/supported-ci-services:
Another important option is
service_name
which allows you to specify where Coveralls should look to find additional information about your builds. This can be any string, but usingtravis-ci
ortravis-pro
will allow Coveralls to fetch branch data, comment on pull requests, and more.
However, on second reading, it seems like using either of them will trigger the Travis integration, and I'm guessing the Travis API is unified and will happily return data no matter which API endpoint you use. So this might not actually have any practical effect, but it's probably still nice to set it.
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.
Updated PR description.
goveralls was not able to detect the current branch since #4735. Instead of
figuring out which variables are needed for it to work correctly, this commit
just propagates all environment variables with the TRAVIS_ prefix. In addition, to match the migration from travis-ci.org to travis-ci.com, the service name was changed to
travis-pro
, as per the Coveralls docs: https://docs.coveralls.io/supported-ci-servicesAlso updates the badges in the readme file. The badge wasn't updated when we
migrated to travis-ci.com. The travis-ci.org address now just has an annoying
redirect page which requires you to click a link to go to the new page on
travis-ci.com. The new badge just takes you there directly.