test(screenshot): enable screenshot tests w/ Firebase Functions and JWT (#3628)

Set up firebase functions to copy valid data to firebase storage/database
Use JasonWebToken to validate data written to firebase
Github Status change will be done in another PR
Result at: https://material2-screenshots.firebaseapp.com/3628
This commit is contained in:
tinayuangao
2017-03-25 08:40:25 +08:00
committed by Jeremy Elbourn
parent 5f360f9a08
commit 23d18a80b3
9 changed files with 335 additions and 52 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
if [[ ${TRAVIS:-} ]]; then
# If FIREBASE_ACCESS_TOKEN not set yet, export the FIREBASE_ACCESS_TOKEN using the JWT token that Travis generated and exported for SAUCE_ACCESS_KEY.
# This is a workaround for travis-ci/travis-ci#7223
# WARNING: FIREBASE_ACCESS_TOKEN should NOT be printed
export FIREBASE_ACCESS_TOKEN=${FIREBASE_ACCESS_TOKEN:-$SAUCE_ACCESS_KEY}
# - we overwrite the value set by Travis JWT addon here to work around travis-ci/travis-ci#7223 for FIREBASE_ACCESS_TOKEN
export SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
fi