Skip to content

Instantly share code, notes, and snippets.

@deepflame
Last active August 29, 2015 13:57
Show Gist options
  • Save deepflame/9351158 to your computer and use it in GitHub Desktop.
Save deepflame/9351158 to your computer and use it in GitHub Desktop.
Take screenshots when KIF fails on Travis (and upload them to S3)
language: objective-c
rvm:
- 1.9.3
env:
global:
- KIF_SCREENSHOTS="${TRAVIS_BUILD_DIR}/Screenshots/${TRAVIS_BUILD_NUMBER}"
- secure: N0tEZ7I8Flu1OPxHqG2a4hdZtq/i/X3nz3vbFZWdO9OW9PAm2BXh6Ndqp0W3CyKTnHuLt1l+6RvoaHW9UxHjpSElYcTHB7f62XDV6ldQ6JFk/B2V9z90imKbBN0v1yijjCN2qYSzwV6vAi+QEMyRyGTUKAKanQAng0cUfFsgT00=
matrix:
- TEST_SDK=iphonesimulator5.1 SIMULATOR=ipad
- TEST_SDK=iphonesimulator6.1 SIMULATOR=ipad
- TEST_SDK=iphonesimulator7.0 SIMULATOR=iphone
- TEST_SDK=iphonesimulator7.0 SIMULATOR=ipad
before_install:
- brew update
- brew install s3cmd
before_script:
- mkdir -p $KIF_SCREENSHOTS
script:
- xctool test -test-sdk $TEST_SDK -simulator $SIMULATOR
after_failure:
- echo "secret_key = $AWS_SECRET" >> .s3cfg
- s3cmd put --guess-mime-type --config=.s3cfg $KIF_SCREENSHOTS/* s3://travis-iopensongs/$TRAVIS_JOB_NUMBER/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment