Skip to content

Instantly share code, notes, and snippets.

@absk1317
Last active June 15, 2019 17:23
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 absk1317/c093b77305b1a0cdc11a8ddaa211f8cf to your computer and use it in GitHub Desktop.
Save absk1317/c093b77305b1a0cdc11a8ddaa211f8cf to your computer and use it in GitHub Desktop.
image: absk1317/ruby-node-pg:2.6
pipelines:
default:
- parallel:
- step:
name: Test
caches:
- bundler
script:
- cp .env.example .env
- export DATABASE_URL=postgresql://postgres:root@localhost/test_db
- bundle install -j 4 --path vendor
- bundle exec rake db:migrate --trace RAILS_ENV=test
- bundle exec rspec
services:
- postgres
- step:
name: Lint
caches:
- bundler
script:
- sed '$d' Gemfile.lock | sed '$d' | sed '$d' > Gemfile.temp_lock && mv Gemfile.temp_lock Gemfile.lock
- bundle install --path vendor
- bundle exec pronto run -f bitbucket_pr -c origin/master
definitions:
caches:
bundler: ./vendor
services:
postgres:
image: postgres:9.5
environment:
POSTGRES_DB: test_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment