Skip to content

Commit 1cb0fe6

Browse files
waprinJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Don't decrypt on PR (GoogleCloudPlatform#389)
1 parent c4dff94 commit 1cb0fe6

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.travis.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,20 @@ addons:
2222
- portaudio19-dev
2323
before_install:
2424
- pip install --upgrade pip wheel virtualenv
25-
- openssl aes-256-cbc -k "$secrets_password" -in secrets.tar.enc -out secrets.tar -d
26-
- tar xvf secrets.tar
25+
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then
26+
openssl aes-256-cbc -k "$secrets_password" -in secrets.tar.enc -out secrets.tar -d;
27+
tar xvf secrets.tar;
28+
fi
2729
install:
2830
- pip install nox-automation coverage
2931
script:
30-
- source ${TRAVIS_BUILD_DIR}/testing/resources/test-env.sh
31-
- nox --stop-on-first-error -s lint travis
32+
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] ; then
33+
source ${TRAVIS_BUILD_DIR}/testing/resources/test-env.sh;
34+
nox --stop-on-first-error -s lint travis;
35+
else
36+
# only run lint on external PRs
37+
nox --stop-on-first-error -s lint travis;
38+
fi
39+
3240
after_script:
3341
- coverage report

0 commit comments

Comments
 (0)