-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
38 lines (34 loc) · 1.05 KB
/
.travis.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
env:
global:
- CC_TEST_REPORTER_ID=f5a226122f0661736323b9f1431103b20ee56788fa5bdda61bd5314b72d47892
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
- PUBSUB_EMULATOR_HOST=localhost:8085
- PUBSUB_PROJECT_ID=subserver-ci
language: ruby
cache:
bundler: true
directories:
- "$HOME/google-cloud-sdk/"
rvm:
- 2.6.1
install:
# Install Google Cloud SDK or load it from cache
- gcloud version || true
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk; curl https://sdk.cloud.google.com | bash; fi
# Add gcloud to $PATH
- source /home/travis/google-cloud-sdk/path.bash.inc
- gcloud version
- gcloud components install pubsub-emulator
# Install Gems via Bundler
- bundle config set --local deployment 'true'
- bundle install
before_script:
# Start Cloud Pubsub Emulator
- gcloud beta emulators pubsub start &
- sleep 20 # Let emulator start on thread
script:
# Run RSpec Tests
'bundle exec rspec ./spec'
after_script:
# Report Coverage to CC
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT