From 5a2ce06a33310ed0a26616e64b3820d9a09ad1cb Mon Sep 17 00:00:00 2001 From: Ben Drucker Date: Mon, 1 Jun 2015 09:29:56 -0400 Subject: [PATCH] Allow PRs to be tested on Travis Travis encrypted env vars are excluded from PRs so instead we install electron and test locally --- .travis.yml | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0aaff7e..185ffa3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ before_install: - npm install npm -g before_script: - npm install -script: npm run ci +script: 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then npm run ci; else npm run test-pr; fi' addons: sauce_connect: true env: diff --git a/package.json b/package.json index e260095..826ec80 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "standard && node test/server.js && zuul --local 9966 -- test/index.js", "ci": "standard && node test/server.js && zuul -- test/index.js", + "test-pr": "standard && node test/server.js && npm i -D electron-prebuilt && zuul --electron -- test/index.js", "start": "budo examples/standalone.js", "build": "browserify index.js --standalone BaseElement -o dist/base-element.js", "prepublish": "npm run build"