-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
38 lines (38 loc) · 1.28 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
image: crhym3/ci-image
git:
depth: 1
cache:
- /cache
env:
- CHROME=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- WEBDRIVER=http://chromedriver.storage.googleapis.com/2.16/chromedriver_linux64.zip
- DISPLAY=:99
script:
# workaround for cache, see https://github.com/drone/drone/issues/147
- mkdir -p /cache/node_modules
- rm -rf node_modules
- ln -s /cache/node_modules node_modules
# install dependencies
- npm install
- Xvfb $DISPLAY &
# ensure the build works
# this will also run gulp mocha
- gulp all
- gulp mocha:closure
# get the version of chrome and driver we want, for more tests
# do this after the build and unit tests to fail fast
- curl -sSLo chrome.deb $CHROME && dpkg -i chrome.deb
- curl -sSLo driver.zip $WEBDRIVER && unzip -q driver.zip -d /usr/bin
# run additional tests
- node test/memory/test.js
deploy:
bash:
when:
owner: google
branch: master
script:
- apt-get install -y python-openssl # gcloud deps for service accounts
- openssl aes-256-cbc -d -in .drone.p12.enc -out .drone.p12 -pass env:DRONE_PASS
- /gcloud/bin/gcloud components update -q gsutil
- /gcloud/bin/gcloud auth activate-service-account $$DRONE_ACCOUNT --key-file .drone.p12
- gulp publish:staging