diff --git a/tololo/config/ci.exs b/tololo/config/ci.exs new file mode 100644 index 00000000..fc667db2 --- /dev/null +++ b/tololo/config/ci.exs @@ -0,0 +1,41 @@ +import Config +config :ash, disable_async?: true + +# Configure your database +# +# The MIX_TEST_PARTITION environment variable can be used +# to provide built-in test partitioning in CI environment. +# Run `mix help test` for more information. +config :tololo, Tololo.Repo, + username: "postgres", + password: "postgres", + hostname: "localhost", + database: "tololo_test#{System.get_env("MIX_TEST_PARTITION")}", + pool: Ecto.Adapters.SQL.Sandbox, + pool_size: System.schedulers_online() * 2 + +# We don't run a server during test. If one is required, +# you can enable the server option below. +config :tololo, TololoWeb.Endpoint, + http: [ip: {127, 0, 0, 1}, port: 4002], + secret_key_base: "qbpNBfHj56JG/dJjuQZmvkAYI084R0kJhx4SKrHodVNMyX5URUsWBAN6rEfVMr1l", + server: false + +# In test we don't send emails +config :tololo, Tololo.Mailer, adapter: Swoosh.Adapters.Test + +# Disable swoosh api client as it is only required for production adapters +config :swoosh, :api_client, false + +# Print only warnings and errors during test +config :logger, level: :warning + +# Initialize plugs at runtime for faster test compilation +config :phoenix, :plug_init_mode, :runtime + +# Enable helpful, but potentially expensive runtime checks +config :phoenix_live_view, + enable_expensive_runtime_checks: true + +config :tololo, :kafka_driver, driver: Tololo.Kafka.Noop +config :tololo, Tololo.Prometheus, disabled: true diff --git a/tololo/config/test.exs b/tololo/config/test.exs index eb88f659..fc667db2 100644 --- a/tololo/config/test.exs +++ b/tololo/config/test.exs @@ -36,3 +36,6 @@ config :phoenix, :plug_init_mode, :runtime # Enable helpful, but potentially expensive runtime checks config :phoenix_live_view, enable_expensive_runtime_checks: true + +config :tololo, :kafka_driver, driver: Tololo.Kafka.Noop +config :tololo, Tololo.Prometheus, disabled: true