Skip to content

Commit

Permalink
Merge pull request #274 from pusher/fix-travis-build
Browse files Browse the repository at this point in the history
Fix travis tests
  • Loading branch information
TomKemp authored Jan 20, 2020
2 parents a2b8b8e + 382864f commit ed79699
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
language: objective-c
osx_image: xcode8.1
osx_image: xcode11.3
sudo: false
before_install:
- gem install xcpretty
install:
- tail -n +4 Sample\ iOS/Constants.h.example > Sample\ iOS/Constants.h
- echo \#define PUSHER_APP_ID @\"$(env | grep PUSHER_APP_ID | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h
- echo \#define PUSHER_API_KEY @\"$(env | grep PUSHER_API_KEY | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h
- echo \#define PUSHER_API_SECRET @\"$(env | grep PUSHER_API_SECRET | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h
- chmod u+x Scripts/travis-set-constants.sh
- Scripts/travis-set-constants.sh
- bundle install
env:
matrix:
- XCODE_SCHEME="libPusher" SDK="iphonesimulator" DESTINATION="OS=10.1,name=iPhone 7"
- XCODE_SCHEME="libPusher-OSX" SDK="macosx" DESTINATION="arch=x86_64"
- XCODE_SCHEME="Functional Specs" SDK="iphonesimulator" DESTINATION="OS=10.1,name=iPhone 7"
- XCODE_SCHEME="libPusher" SDK="iphonesimulator" DESTINATION="OS=13.3,name=iPhone 11" ADDITIONAL_ARGUMENTS=""
- XCODE_SCHEME="libPusher-OSX" SDK="macosx" DESTINATION="arch=x86_64" ADDITIONAL_ARGUMENTS="MACOSX_DEPLOYMENT_TARGET=10.9"
- XCODE_SCHEME="Functional Specs" SDK="iphonesimulator" DESTINATION="OS=13.3,name=iPhone 11" ADDITIONAL_ARGUMENTS=""
script:
- set -o pipefail
- rackup -p 9292 Scripts/auth_server.ru > logs.txt 2>&1 &
- xcodebuild -workspace libPusher.xcworkspace -scheme "$XCODE_SCHEME" -sdk "$SDK" test -destination "$DESTINATION" | xcpretty -tc
- xcodebuild -workspace libPusher.xcworkspace -scheme "$XCODE_SCHEME" -sdk "$SDK" test -destination "$DESTINATION" $ADDITIONAL_ARGUMENTS | xcpretty -tc
5 changes: 5 additions & 0 deletions Scripts/travis-set-constants.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
tail -n +4 Sample\ iOS/Constants.h.example > Sample\ iOS/Constants.h
echo \#define PUSHER_APP_ID @\"$(env | grep PUSHER_APP_ID | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h
echo \#define PUSHER_API_KEY @\"$(env | grep PUSHER_API_KEY | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h
echo \#define PUSHER_API_SECRET @\"$(env | grep PUSHER_API_SECRET | cut -d "=" -f 2)\" >> Sample\ iOS/Constants.h

0 comments on commit ed79699

Please sign in to comment.