photo / openphoto-python

A Python OAuth client for OpenPhoto
http://theopenphotoproject.org
Apache License 2.0
42 stars 16 forks source link

Add support for TravisCI #37

Closed jmathai closed 11 years ago

jmathai commented 11 years ago

Let's add TravisCI to automatically run the unit tests for commits and merges.

http://about.travis-ci.org/docs/

sneakypete81 commented 11 years ago

I've been experimenting with this last week, and have something working - I'll do a PR soon.

Many of the tests are more integration tests than unit tests, and require oauth keys to a test host. Fortunately Travis supports encrypted env vars, so we can so this securely.

jmathai commented 11 years ago

Wonderful. I'm also fine setting up a test account specifically for the tests.

For the openphoto/frontend tests we mock everything out (mysql, file system, etc) which helps keep us from getting false positives because of a dependency. It's be nice to work that in here but I'm very very happy to have just this as a start.

sneakypete81 commented 11 years ago

Agree about mocking - I'll get to this at some point.

It's been very useful to be able to run the tests against a real host, to thrash out a few API issues.

jmathai commented 11 years ago

It helps on the API side too :).

Thanks for the contributions so far. It's really great to have you on board.

sneakypete81 commented 11 years ago

Ok, Travis is set up and seems to be working.

It's a bit unstable due to #42, but for now I can manually re-trigger the Travis hook if the build fails due to this.

The eventual goal is to write a fuller set of unit tests and remove the integration tests from Travis run.