Skip to content

Latest commit

 

History

History
38 lines (34 loc) · 1.6 KB

TRAVIS.md

File metadata and controls

38 lines (34 loc) · 1.6 KB

Running Tests on Travis

Travis automatically runs tests whenever a github repo changes. To have Travis automatically run tests on your forked copy of this repo:

  1. Fork this repo on GitHub.

  2. Visit the Google Developers Console and choose an existing project or create a new project.

  3. Under APIs & auth, choose Credentials.

  4. Click Add credentials, and then click Service account.

  5. Under Key type, choose JSON, and then click Create. A json credential file will be downloaded to your computer.

  6. Under APIs & auth, enable Cloud Datastore API.

  7. Create a Cloud SQL instance, assign an IPv4 IP address, then create a database and a user.

  8. Create a Cloud Storage bucket.

  9. Visit Travis and turn on Travis for your new forked repo.

  10. Go back to the Travis home page, click on your repo, then click on Settings.

  11. Under Environment Variables, set the following envvars:

    • GOOGLE_PROJECT_ID
    • GOOGLE_STORAGE_BUCKET
    • MYSQL_DSN
    • MYSQL_USER
    • MYSQL_PASSWORD

    Be sure te leave Display value in build log switched OFF for secret values.

  12. Base-64 encode the json file you downloaded in step 5. On unix machines, this can be done with a command like base64 -w 0 < my-test-bf4af540ca4c.json.

  13. Under Environment Variables, set GOOGLE_CREDENTIALS_BASE64 to the base64-encoded json from step 9. Be sure te leave Display value in build log switched OFF.