wip: experiment with drone cache
Some checks failed
continuous-integration/drone/pr Build is failing

Try to make builds faster
This commit is contained in:
Joao P Dubas 2022-04-24 11:30:18 +00:00
parent 670da3c0f6
commit 02b1dc55a6

View File

@ -5,7 +5,6 @@ name: test
trigger:
event:
- push
- pull_request
steps:
@ -17,6 +16,23 @@ steps:
PGHOST: db
commands:
- while ! pg_isready; do sleep 1; done
- name: restore cache
image: 'meltwater/drone-cache:dev'
pull: true
settings:
archive_format: gzip
backend: filesystem
cache_key: volume
mount:
- _build
- deps
restore: true
exit_code: true
volumes:
- name: cache
path: /tmp/cache
- name: test
image: 'elixir:1.13.4'
environment:
@ -28,9 +44,29 @@ steps:
- mix do local.rebar --force, local.hex --force, deps.get, deps.compile
- mix test --cover --trace --slowest 10
- name: rebuild cache
image: 'meltwater/drone-cache:dev'
pull: true
settings:
archive_format: gzip
backend: filesystem
cache_key: volume
mount:
- _build
- deps
rebuild: true
exit_code: true
volumes:
- name: cache
path: /tmp/cache
services:
- name: db
image: 'postgres:14.2-alpine'
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- name: cache
temp: {}