Add the drone CI/CD configuration.
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
environment:
|
||||
DATABASE_HOSTNAME: postgres
|
||||
|
||||
steps:
|
||||
- name: install dependencies
|
||||
image: elixir:1.16.3
|
||||
volumes:
|
||||
- name: mix
|
||||
path: /root/.mix
|
||||
commands:
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get
|
||||
|
||||
- name: run tests
|
||||
image: elixir:1.16.3
|
||||
volumes:
|
||||
- name: mix
|
||||
path: /root/.mix
|
||||
commands:
|
||||
- mix test
|
||||
|
||||
volumes:
|
||||
- name: mix
|
||||
temp: {}
|
||||
|
||||
services:
|
||||
- name: postgres
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_DB: decentralised_book_index_dev
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
+3
-3
@@ -8,9 +8,9 @@ config :ash, disable_async?: true
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :decentralised_book_index, DecentralisedBookIndex.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
username: System.get_env("DATABASE_USERNAME", "postgres"),
|
||||
password: System.get_env("DATABASE_PASSWORD", "postgres"),
|
||||
hostname: System.get_env("DATABASE_HOSTNAME", "localhost"),
|
||||
database: "decentralised_book_index_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: System.schedulers_online() * 2
|
||||
|
||||
Reference in New Issue
Block a user