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

Travis CI integration #1201

Closed
wants to merge 1 commit into from
Closed

Conversation

mark-rushakoff
Copy link

This commit includes everything necessary to run the test suite in PhantomJs on Travis CI.

You can see a green build at http://travis-ci.org/#!/mark-rushakoff/backbone

@braddunbar
Copy link
Collaborator

I'm not sure where @jashkenas stands on this, but if we're going to run tests from the console I'd rather it be rolled up in something like grunt so that we aren't maintaining it. Will grunt run on travis? If so, can we just include it in package.json and point travis to a script that does grunt qunit?

@mark-rushakoff
Copy link
Author

I don't know enough about node/npm to say so definitively, but it does look like you would be able to just drop grunt in (via package.json) and run qunit.

I didn't know of grunt until just now, and glancing over its code, I feel like he's offering a more full-featured suite of tools at the cost of more configuration. On the other hand, your concern about maintenance is very valid, and I haven't yet solved that problem in my project (OpenPhantomScripts, from which the code in this pull request came).

I won't be offended if you choose grunt over my project -- I'd just really like to see that Travis "build: passing" badge on the front page of Underscore and Backbone.

In the meantime, I'm going to do some research into how to alleviate the maintenance concern you have with my code (if anyone has any comments, please chime in on the issue on OpenPhantomScripts).

@jashkenas
Copy link
Owner

I'm a little confused -- why would we want to test Backbone outside of a browser? ... given that it's intended to run in the browser, and we already test commits and patches in browsers. What do we gain?

@tbranyen
Copy link
Collaborator

tbranyen commented Apr 8, 2012

@jashkenas headless testing with grunt would be nice since its something you get "for free", it takes no added work other than pointing to the qunit folder and then you could put that in front of the min process to stop it from building if there are any errors.

i don't see it as anything other than convenience.

@mark-rushakoff
Copy link
Author

PhantomJs is a headless webkit browser. It should behave (roughly) the same as Safari or Chrome. So running the tests in Phantom isn't "outside a browser", it's "in another browser."

While I do believe that you do manually test commits, by not having a published CI, I feel like you're asking the consumers of Underscore and Backbone to take it on faith that the last commit has been tested. Or you're asking us to run the tests ourselves before we put the library in our code.

When I see the green "build passed" badge on a Github project, I am reasonably assured that the code from the latest commit works as intended.

Maybe a compromise is to put a direct link to the tests in the README?

@jashkenas
Copy link
Owner

Yep -- there are direct links to the live test pages at the top of the homepage (which serves as the real README).

When I see the green "build passed" badge on a Github project, I am
reasonably assured that the code from the latest commit works as intended.

... I think you're putting overmuch faith in the existence of tests then. Our releases always pass the test suite in major browsers, but we nonetheless frequently have bugs in untested edge cases.

@jashkenas jashkenas closed this Apr 9, 2012
@jashkenas jashkenas reopened this Sep 4, 2012
@jashkenas
Copy link
Owner

Reopening ...

Now that GitHub pull requests support Travis badges, there's a pretty solid benefit to potentially adding Travis support.

https://github.com/blog/1227-commit-status-api

@philfreo
Copy link
Contributor

philfreo commented Sep 9, 2012

+1 for using grunt qunit. grunt could also replace the Rakefile so the project is fully JS-based.

http://gruntjs.com/

jashkenas added a commit that referenced this pull request Nov 28, 2012
Fix gh-1201 - Simple TravisCI support.
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.

5 participants