From cfb25a83f3465a20dc35149889c3c526ff683c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Tuszy=C5=84ski?= Date: Thu, 15 Nov 2018 17:31:04 +0100 Subject: [PATCH 1/2] Add .drone.yml --- .drone.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..2529c3c --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +pipeline: + build: + image: ruby:2.2.1 + commands: + - bundle install + - bundle exec rake db:setup + - bundle exec rake test + environment: + - RACK_ENV=test + - DATABASE_URL=postgres://postgres:postgres@database/myapp_test + +services: + database: + image: postgres From 0c85706e401936e87de67273364409dbfa32d946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Tuszy=C5=84ski?= Date: Thu, 15 Nov 2018 17:38:04 +0100 Subject: [PATCH 2/2] Enable cache --- .drone.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2529c3c..5429c10 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,14 +1,30 @@ pipeline: + restore-cache: + image: drillster/drone-volume-cache + restore: true + mount: + - ./.bundle + volumes: + - /tmp/cache:/cache + build: image: ruby:2.2.1 commands: - - bundle install + - bundle install --path=.bundle/gems --without development production staging - bundle exec rake db:setup - bundle exec rake test environment: - RACK_ENV=test - DATABASE_URL=postgres://postgres:postgres@database/myapp_test + rebuild-cache: + image: drillster/drone-volume-cache + rebuild: true + mount: + - ./.bundle + volumes: + - /tmp/cache:/cache + services: database: image: postgres