-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwercker.yml
70 lines (59 loc) · 2.11 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This references the default Ruby container from
# the Docker Hub.
# https://registry.hub.docker.com/_/ruby/
# If you want to use a specific version you would use a tag:
ruby: 2.3.1
box: ruby
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
services:
- postgres
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongodb
# http://devcenter.wercker.com/docs/services/mongodb.html
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
build:
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# NOTE JS runtimeとしてNode.jsをインストール
- script:
name: install JavaScript Runtime(Node.js)
code: |
sudo apt-get update
sudo apt-get install -y nodejs
# NOTE この設定をしないと wercker での bundle install 時に失敗する
# https://github.com/wercker/support/issues/161
- script:
name: bundle - nokogiri use sys lib
code: bundle config build.nokogiri --use-system-libraries
- bundle-install
- rails-database-yml:
service: postgresql-docker
- script:
name: set up database
code: RAILS_ENV=test bin/rails db:migrate
- script:
name: insert test data
code: RAILS_ENV=test bin/rails db:seed
- script:
name: cucumber features
code: bundle exec cucumber
- script:
name: Minitest
code: bin/rake test
- add-ssh-key:
keyname: WERCKER_GITHUB_CI_KEY
- add-to-known_hosts:
hostname: github.com
fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
- script:
code: |
if [ "${BUNDLE_UPDATE}" ] ; then
gem update bundler --no-document
gem install wercker-bundle-update-pr
wercker-bundle-update-pr ${GITHUB_USERNAME} ${GITHUB_EMAIL}
fi