diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8ca4d73 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +before_cache: rm -f $HOME/.gradle/caches/modules-2/modules-2.lock +cache: + yarn: true + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ +before_install: + - nvm install 12.0.0 + - npm i -g yarn +install: yarn +jobs: + include: + - language: android + android: + components: + - build-tools-28.0.3 + - android-28 + - android-22 + - sys-img-armeabi-v7a-android-22 + licenses: + - android-sdk-license-.+ + environment: + GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2" + TERM: "dumb" + before_script: + - echo no | android create avd -f -n test -t android-22 -b armeabi-v7a + - emulator -avd test -no-audio -no-window & + - android-wait-for-emulator + - adb shell input keyevent 82 & + - cd android/ + script: ./gradlew connectedCheck + - language: objective-c + osx_image: xcode11.2 + before_script: + - gem install cocoapods -v '1.8.4' + - cd ios/ + - pod install + script: xcodebuild -workspace rnsampleapp.xcworkspace -scheme rnsampleapp -destination "platform=iOS Simulator,name=iPhone X,OS=11.4" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/README.md b/README.md index 0c559bf..0057b86 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,11 @@ A sample React Native app with simple CI integrations. ### Travis CI -TODO +[![Build Status][5]][6] [1]: https://github.com/fbluemle/sampleapp-react-native/workflows/main/badge.svg [2]: https://github.com/fbluemle/sampleapp-react-native/actions [3]: https://circleci.com/gh/fbluemle/sampleapp-react-native.svg?style=shield [4]: https://circleci.com/gh/fbluemle/sampleapp-react-native +[5]: https://travis-ci.org/fbluemle/sampleapp-react-native.svg?branch=master +[6]: https://travis-ci.org/fbluemle/sampleapp-react-native