From 6a1c869ea450c47b86418fa5d1773391f57cc56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Eppl=C3=A9e?= Date: Wed, 28 May 2025 17:34:57 +0200 Subject: [PATCH 1/2] Add CI cache --- .drone.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.drone.yml b/.drone.yml index ca154e0..4a4f3d4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,26 @@ trigger: - push steps: + - name: compute cache key + image: docker.io/library/elixir:1.18.3-otp-27 + commands: + - mix_lock_hash=$(sha256sum mix.lock | cut -d ' ' -f 1) + - echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$mix_lock_hash" >> .cache_key + # Print cache key for debugging + - cat .cache_key + + - name: restore-cache + image: drillster/drone-volume-cache + settings: + restore: true + mount: + - ./deps + - ./_build + ttl: 30 + volumes: + - name: cache + path: /cache + - name: lint image: docker.io/library/elixir:1.18.3-otp-27 commands: @@ -64,6 +84,22 @@ steps: # Run tests - mix test + - name: rebuild-cache + image: drillster/drone-volume-cache + settings: + rebuild: true + mount: + - ./deps + - ./_build + volumes: + - name: cache + path: /cache + +volumes: + - name: cache + host: + path: /tmp/drone_cache + --- kind: pipeline type: docker From d54b226be5b89d5fe65d1b749c95e23396300364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Eppl=C3=A9e?= Date: Wed, 18 Jun 2025 14:41:17 +0200 Subject: [PATCH 2/2] fix(ci): Dont install dependencies again in test step --- .drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4a4f3d4..1a5e3ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -79,8 +79,6 @@ steps: commands: # Install hex package manager - mix local.hex --force - # Fetch dependencies - - mix deps.get # Run tests - mix test