From 2a58f5dcaacb8a9cf396a37b361015ff4b58db44 Mon Sep 17 00:00:00 2001
From: rinpatch <rinpatch@sdf.org>
Date: Thu, 29 Nov 2018 11:45:14 +0300
Subject: [PATCH 1/3] Add dependency caching

---
 .gitlab-ci.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c28468cd4..ec67607c3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,9 @@ variables:
   POSTGRES_USER: postgres
   POSTGRES_PASSWORD: postgres
   DB_HOST: postgres
-
+cache:
+  paths:
+          - deps
 stages:
   - lint
   - test

From 36826b11a6cedad942823cea81a71566313ba910 Mon Sep 17 00:00:00 2001
From: rinpatch <rinpatch@sdf.org>
Date: Thu, 29 Nov 2018 12:09:32 +0300
Subject: [PATCH 2/3] Cache _build

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ec67607c3..154bc758b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ variables:
 cache:
   paths:
           - deps
+          - _build
 stages:
   - lint
   - test

From 72f038bdf27d088556b9dd400423fe3c5e36fbe6 Mon Sep 17 00:00:00 2001
From: rinpatch <rinpatch@sdf.org>
Date: Thu, 29 Nov 2018 12:20:47 +0300
Subject: [PATCH 3/3] Only jobs for one branch are allowed to use the same
 cache

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 154bc758b..7c240d9f1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,9 @@ variables:
   POSTGRES_USER: postgres
   POSTGRES_PASSWORD: postgres
   DB_HOST: postgres
+
 cache:
+  key: ${CI_COMMIT_REF_SLUG}
   paths:
           - deps
           - _build