From c86480e72b5b4fa20240ebdf0c9620d1c4c66b69 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Sat, 21 Nov 2020 22:45:50 +0100 Subject: [PATCH] Cache dependencies on CI https://florian-latifi.at/2018/02/21/using-drone-to-build-and-deploy-a-jekyll-site/ https://git.florian-latifi.at/flortsch/jekyll-blog/src/branch/master/.drone.yml --- .drone.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0777e17..d38f769 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,12 +3,35 @@ type: docker name: CI build steps: + - name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: cache + path: /cache + settings: + restore: true + mount: + - vendor - name: rspec image: guildeducation/rails:2.7.1-12.19.0 commands: - - bundle install --jobs=3 --retry=3 + - bundle install --jobs=3 --retry=3 --deployment - yarn install - bundle exec rspec when: branch: - master + - name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: cache + path: /cache + settings: + rebuild: true + mount: + - vendor + +volumes: + - name: cache + host: + path: /var/lib/drone/tmp