This commit is contained in:
parent
cae7509462
commit
b1e6a54e65
1 changed files with 48 additions and 12 deletions
60
.drone.yml
60
.drone.yml
|
|
@ -14,6 +14,26 @@ trigger:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: compute cache key
|
||||||
|
image: docker.io/library/elixir:1.18.3-otp-27
|
||||||
|
commands:
|
||||||
|
- echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME" >> .cache_key
|
||||||
|
- echo $(sha256sum mix.lock) >> .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: /tmp/cache
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
image: docker.io/library/elixir:1.18.3-otp-27
|
image: docker.io/library/elixir:1.18.3-otp-27
|
||||||
commands:
|
commands:
|
||||||
|
|
@ -50,18 +70,34 @@ steps:
|
||||||
echo "Postgres did not become available, aborting."
|
echo "Postgres did not become available, aborting."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: test
|
# - name: test
|
||||||
image: docker.io/library/elixir:1.18.3-otp-27
|
# image: docker.io/library/elixir:1.18.3-otp-27
|
||||||
environment:
|
# environment:
|
||||||
MIX_ENV: test
|
# MIX_ENV: test
|
||||||
TEST_POSTGRES_HOST: postgres
|
# TEST_POSTGRES_HOST: postgres
|
||||||
commands:
|
# commands:
|
||||||
# Install hex package manager
|
# # Install hex package manager
|
||||||
- mix local.hex --force
|
# - mix local.hex --force
|
||||||
# Fetch dependencies
|
# # Fetch dependencies
|
||||||
- mix deps.get
|
# - mix deps.get
|
||||||
# Run tests
|
# # Run tests
|
||||||
- mix test
|
# - mix test
|
||||||
|
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: drillster/drone-volume-cache
|
||||||
|
settings:
|
||||||
|
rebuild: true
|
||||||
|
mount:
|
||||||
|
- ./deps
|
||||||
|
- ./_build
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/drone_cache
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue