Squashed commit of the following:

commit 80da7601c48d63c92f909f4a3b4c6559bd907470
Merge: 2bf900d f0d997b
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 19:11:08 2016 +0200

    Merge branch 'travis' of github.com:HabitRPG/habitrpg-android into travis

    # Conflicts:
    #	.travis.yml

commit 2bf900df64aa241db5feeb4820b643cd0e1fa1e8
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 19:05:37 2016 +0200

    .

commit f0d997b56f37d511e66e18734716934efef3af13
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 19:05:37 2016 +0200

    .

commit 62e96caf288ae6f7260d4eb73164f082db0c7016
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 17:16:06 2016 +0200

    .

commit b0f640ced3c2a0e654a2b34ca2fe8307be0b7208
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 17:12:09 2016 +0200

    .

commit 97d3892b0e9b259e94f1920ffe6226da05fa218c
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 16:16:04 2016 +0200

    .

commit 6b89f5ee013c2711fe1872e7ff657439ab61a02d
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 16:00:39 2016 +0200

    set node version

commit 79e2b3af80741266c8ba9dda90d6a3ad40c56d0a
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 15:44:13 2016 +0200

    test

commit 11a68ba8e91e219ad1db9f7cc6bac3a203cdd60f
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 15:16:23 2016 +0200

    test different config

commit 9c96911dc31d1ba123481eb3d291aee274973474
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 14:52:33 2016 +0200

    fix config

commit 9f41579bd9289985fb98f1a46d0292f897b6b420
Author: Phillip Thelen <viirus@pherth.net>
Date:   Tue Jun 7 14:48:15 2016 +0200

    fix yaml
This commit is contained in:
Phillip Thelen 2016-06-10 19:07:31 +02:00
parent 4e637530df
commit eeac345a3a
2 changed files with 14 additions and 8 deletions

View file

@ -3,17 +3,19 @@ jdk: oraclejdk8
before_install:
- export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
- export JAVA8_HOME=/usr/lib/jvm/java-8-oracle
- cp habitica.properties.travis habitica.properties
- nvm install 4.1.1
- nvm use 4.1.1
- npm i -g npm@3
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' |
sudo tee /etc/apt/sources.list.d/mongodb.list
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
- sudo apt-get update
- sudo apt-get install mongodb-org-server
- git clone https://github.com/HabitRPG/habitrpg.git ../habitrpg
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
- cd ../habitrpg && cp config.json.example config.json && npm install && cd -
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 2; done
- cd ../habitrpg && cp config.json.example config.json && npm install
- npm start &
- until nc -z localhost 3000; do echo Waiting for Habitica Server; sleep 2; done
- cd -
android:
components:
# Uncomment the lines below if you want to
@ -37,6 +39,6 @@ android:
#- sys-img-armeabi-v7a-android-19
#- sys-img-x86-android-17
script:
- cp habitica.properties.example habitica.properties
- cp habitica.properties.travis habitica.properties
- ./gradlew assembleDebug
- ./gradlew testDebugUnitTest
- ./gradlew testDebugUnitTest --info

View file

@ -17,6 +17,7 @@ import org.robolectric.annotation.Config;
import android.os.Build;
import java.security.InvalidParameterException;
import java.util.List;
import java.util.UUID;
@ -32,6 +33,9 @@ public class BaseAPITests {
@Before
public void setUp() {
if (BuildConfig.BASE_URL.contains("habitica.com")) {
throw new InvalidParameterException("Can't test against production server.");
}
hostConfig = new HostConfig(BuildConfig.BASE_URL,
BuildConfig.PORT,
"",