Skip to content
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

Merged
merged 2 commits into from
May 29, 2020

Conversation

yuriks
Copy link
Contributor

@yuriks yuriks commented May 28, 2020

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-services

Also 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.

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.
@yuriks yuriks requested a review from a team as a code owner May 28, 2020 22:36
.travis.yml Outdated Show resolved Hide resolved
@@ -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
- >-
Copy link
Contributor

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?

Copy link
Contributor Author

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/

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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 using travis-ci or travis-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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated PR description.

@jsha jsha merged commit 697c221 into letsencrypt:master May 29, 2020
@yuriks yuriks deleted the fix-badges branch May 29, 2020 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants