Skip to content

Commit 3c108df

Browse files
authored
Merge pull request #93 from GoogleCloudPlatform/circleci
Add CircleCI to Master!
2 parents 278664b + 5db17cc commit 3c108df

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

circle.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# CircleCI Build yaml
2+
# General information
3+
general:
4+
branches:
5+
only:
6+
- master
7+
8+
# Define VM
9+
machine:
10+
# Timezone
11+
timezone: America/Los_Angeles
12+
13+
# Dependencies needed by run-all.sh
14+
dependencies:
15+
override:
16+
- sudo apt-get update; sudo apt-get install realpath
17+
18+
# Test
19+
test:
20+
override:
21+
# Ruby 2.2.5
22+
- rvm-exec 2.2.5 ./spec/run-all.sh
23+
# Ruby 2.3.1
24+
- rvm-exec 2.3.1 ./spec/run-all.sh
25+

spec/run-all.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#! /bin/bash
2-
3-
set -e
1+
#!/bin/bash
42

53
for required_variable in \
64
GOOGLE_CLOUD_PROJECT \
@@ -25,7 +23,12 @@ export TRANSLATE_KEY="$TRANSLATE_API_KEY"
2523

2624
script_directory="$(dirname "`realpath $0`")"
2725
repo_directory="$(dirname $script_directory)"
26+
status_return=0 # everything passed
27+
28+
# Print out Ruby version
29+
ruby --version
2830

31+
# Run Tets
2932
for product in \
3033
bigquery \
3134
datastore \
@@ -39,6 +42,12 @@ for product in \
3942
; do
4043
echo "[$product]"
4144
cd "$repo_directory/$product/"
42-
bundle install
43-
bundle exec rspec --format documentation --fail-fast
45+
bundle install && bundle exec rspec --format documentation
46+
47+
# Check status of bundle exec rspec
48+
if [ $? != 0 ]; then
49+
status_return=1
50+
fi
4451
done
52+
53+
exit $status_return

0 commit comments

Comments
 (0)