diff --git a/.travis.yml b/.travis.yml index 956eac5d8..e46d98d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,16 @@ sudo: true git: depth: false before_install: -- openssl aes-256-cbc -K $encrypted_342342ee5e49_key -iv $encrypted_342342ee5e49_iv - -in gcp-credentials.json.enc -out gcp-credentials.json -d +- | + if [ "$TRAVIS_PULL_REQUEST_SLUG" != "pulumi/pulumi" ]; + then + echo "Not decrypting gcp credentials"; + export COMMUNITY_PR="true" + else + echo "Decrypting gcp credentials" + openssl aes-256-cbc -K $encrypted_342342ee5e49_key -iv $encrypted_342342ee5e49_iv -in gcp-credentials.json.enc -out gcp-credentials.json -d + export COMMUNITY_PR="false" + fi - git clone https://github.com/pulumi/scripts ${GOPATH}/src/github.com/pulumi/scripts - source ${GOPATH}/src/github.com/pulumi/scripts/ci/prepare-environment.sh - source ${PULUMI_SCRIPTS}/ci/keep-failed-tests.sh diff --git a/pkg/cmd/pulumi/new_test.go b/pkg/cmd/pulumi/new_test.go index d2de8fc5f..56d87333d 100644 --- a/pkg/cmd/pulumi/new_test.go +++ b/pkg/cmd/pulumi/new_test.go @@ -807,6 +807,9 @@ func removeStack(t *testing.T, name string) { } func skipIfShort(t *testing.T) { + if os.Getenv("COMMUNITY_PR") == "true" { + t.Skip("Skipped for community PRs") + } if testing.Short() { t.Skip("Skipped in short test run") } diff --git a/pkg/npm/npm_test.go b/pkg/npm/npm_test.go index 1f673bcc2..c5abfbaf6 100644 --- a/pkg/npm/npm_test.go +++ b/pkg/npm/npm_test.go @@ -33,6 +33,10 @@ func TestYarnInstall(t *testing.T) { } func testInstall(t *testing.T, expectedBin string) { + // Skip for community PRs + if os.Getenv("COMMUNITY_PR") == "true" { + t.Skip("Skipped for community PRs") + } // Skip during short test runs since this test involves downloading dependencies. if testing.Short() { t.Skip("Skipped in short test run")