The Enablement of Android-based Travis CI

Although we haven’t released our first version of android app, we still need a CI tool to help us have good quality of code. The Travis CI is an excellent CI tool in this area. And the most important is “IT’S FREE for OPEN SOURCE PROJECT”. That’s so great.

I am responsible for enabling the travis CI in WikiCards which is an android project. Before that, we had created a test project based on android test framework in android-test folder.

The hardest part of enabling travis is to write the correct .travis.yml. Thanks for the doc here. I can enable it easily. The following is our .travis.yml:


You may find most of them are the same as the example. And yes, it is copied from example and it works pretty good.

The main difference is we use our-owned, which is modified from another open source project. If we use the default android-wait-for-emulator, we may not really wait for emulator to run. It just runs when the emulator is created.

Another one is that we still use ant to build the android project for us. But the ant always returns 0 even if there is some failure in test case of build. That’s a serious problem. So, we write our owned script to catch all unit tests logs and exam them line by line to tell travis if our test cases passed or not.





You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *