Skip to content

Instantly share code, notes, and snippets.

Created September 23, 2017 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f0327773953f086bc4990784b16e63a7 to your computer and use it in GitHub Desktop.
Save anonymous/f0327773953f086bc4990784b16e63a7 to your computer and use it in GitHub Desktop.
options:
docker: true
pipelines:
default:
- step:
caches:
- bundler
services:
- redis
- postgres
image: zulhfreelancer/ruby_nodejs:latest
script:
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
- export RAILS_ENV=test DB_USER=postgres
- gem update bundler
- bundle install --path vendor/bundle --jobs=5 --retry=3
- bundle exec rake db:create db:migrate
- bundle exec rspec
branches:
development:
- step:
caches:
- bundler
services:
- redis
- postgres
image: zulhfreelancer/ruby_nodejs:latest
script:
- echo "This script runs only on commit to the development branch."
- export RAILS_ENV=test DB_USER=postgres
- gem update bundler
- bundle install --path vendor/bundle --jobs=5 --retry=3
- bundle exec rake db:create db:migrate
- bundle exec rspec
definitions:
caches:
bundler: vendor/bundle
services:
redis:
image: redis:2.8.22
postgres:
image: postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment