Skip to content

Commit

Permalink
chore: updated test.exs and added ci.exs config file for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekkice committed Jan 14, 2025
1 parent f97742b commit 7984f3a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tololo/config/ci.exs
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions tololo/config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7984f3a

Please sign in to comment.