-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwercker.yml
45 lines (45 loc) · 1.5 KB
/
wercker.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
39
40
41
42
43
44
45
box: ruby:2.3.3
services:
- id: postgres
env:
POSTGRES_PASSWORD: ourlittlesecret
POSTGRES_USER: myuser # optional
build:
steps:
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: Install PhantomJS
code: |
PHANTOM_VERSION="phantomjs-1.9.8"
ARCH=$(uname -m)
if ! [ $ARCH = "x86_64" ]; then
$ARCH="i686"
fi
if test -d "$WERCKER_CACHE_DIR/$PHANTOM_JS"; then
PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"
apt-get update
apt-get install build-essential chrpath libssl-dev libxft-dev -y
apt-get install libfreetype6 libfreetype6-dev -y
apt-get install libfontconfig1 libfontconfig1-dev -y
cd $WERCKER_CACHE_DIR
curl -L -O https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
tar xvjf $PHANTOM_JS.tar.bz2
fi
ln -sf $WERCKER_CACHE_DIR/$PHANTOM_JS/bin/phantomjs /usr/local/bin
- bundle-install
- rails-database-yml
- script:
name: Set up db
code: bundle exec rake db:schema:load RAILS_ENV=test
- script:
name: rspec
code: bundle exec rspec
deploy:
steps:
- heroku-deploy:
key-name: HEROKU_DEPLOY_KEY
run: rake db:migrate
after-steps:
- wantedly/pretty-slack-notify:
webhook_url: $SLACK_WEBHOOK_URL