Showing Travis build status in GitHub repo
Solution 1
I give you my example - https://github.com/simkimsia/UtilityBehaviors
I wrote this in my README.mdown
### Status
[![Build Status](https://travis-ci.org/simkimsia/UtilityBehaviors.png)](https://travis-ci.org/simkimsia/UtilityBehaviors)
So the answer is
[![Build Status](your travis url for the repo here.png)](your travis url for the repo here)
EDIT:
I realized that you may mean turning on the Travis Service Hook.
If that is what you mean, go to your github repo > Settings > Service Hooks. Use Ctrl+F and search for Travis.
EDIT2:
Go to https://travis-ci.org/profile/{fill in your own usernam}/profile
Then copy the token and paste it inside the Travis Service Hook page in your Github Repo Settings section.
Type in your username in Travis as well.
Try the test send token button.
You should see payload successfully sent.
If this works, your github repo is now hooked up to your travis.
EDIT3:
The OP is asking about the travis build status for commits found in pull requests pages.
He assumed that the travis build status will appear anywhere as long as there is a commit.
My answer is that the assumption is not correct.
Solution 2
Github Integration
Go to https://travis-ci.org/{username or org}/{repository}
Click the Status Image (a pop-up will appear)
- Select a branch, then click the dropdown Image URL ▼ and set it to Markdown ▼.
Copy Paste the code to your
README.md
Git add, commit & push. Refresh Github and you'll see the image now.
Solution 3
For getting markup You should go to
https://travis-ci.org/{username}/{repository}
Push the button with "Build status images" title under Your username at the top right
After that You will get a popup with markups for different environments Here is a screenshot with popup for my own repository
Solution 4
To have the same result as example here your push/pull request must build.
This picture means Pull Request didn't build successfully
andig
Updated on March 05, 2020Comments
-
andig about 4 years
I remember recently seeing the Travis build status of a pr or commit in GitHub browsing the repository (but can't find where). I'm not talking about the Travis build status images in
README.md
but an actual GitHub feature (green box with a friendly check mark).While my commits build on Travis just fine I'd like to get the results displayed in GitHub (which they don't do right now). I'd like to know how to enable this.
UPDATE
Found an example here - see the small green check mark saying "Travis-CI build passed"?
-
andig over 10 yearsNot quite what I mean- hopefully question becomes clearer with update. Service hooks are enabled- otherwise I wouldn't get Travis build at all?
-
Kim Stacks over 10 yearsThis should be automatically filled in for you provided your Service hook is correctly setup and you have made at least 1 push AFTER your Travis is hooked with your GitHub. Note that the commits made BEFORE your Travis is hooked with your GitHub will not have the green arrows even AFTER you have hooked with Travis. If your is public, can show us the url to your travis page?
-
andig over 10 yearsmy gihub repo, current tree: github.com/andig/volkszaehler.org/tree/travis my travis build status: travis-ci.org/andig/volkszaehler.org/builds Builds have been setup weeks ago, and build fine, yet I can't find the assuring green "you're ok" marks
-
Kim Stacks over 10 yearsThey appear in the pull requests page. See here? github.com/volkszaehler/volkszaehler.org/pull/55
-
andig over 10 yearsdoh: so they don't appear in my commits but only when I push back to master?
-
Kim Stacks over 10 yearssame case as your example. They appear in pull requests page too yes?
-
andig over 10 years+1 for the excellent support, though not the result I was hoping for (showing build status in the commits)
-
andig about 10 yearsDoes not answer the question. I was referring to the GitHub integration.
-
podarok about 10 yearsI was refering to github integration too
-
Phil over 9 yearsIMHO this is the best answer
-
Anvesh Checka almost 9 yearsShort and sweet answer
-
om39a about 8 yearsWhat about the other options that are there in the dropdown? Where do we use them ?
-
barry over 7 yearsThis doesn't answer the question - see the link in the question
-
Adrian Enriquez over 7 yearsNice extension!
-
pronebird about 7 yearsYou can use SVG if you don't want blurry PNG
-
Yamakuzure about 5 yearsThis is the correct answer. Once Travis is set up, PRs are handled automatically.
-
rubo77 almost 4 yearsThis button is always green, even if it is still building (should be yellow then)
-
rubo77 almost 4 yearsI cannot find any "Service Hooks" in my settings, where exactly is this option?
-
Amin Pial almost 3 yearsthis is the best answer.