mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 00:22:40 +00:00
configurable logging in test env
This commit is contained in:
parent
dfb497f07e
commit
b615257c26
6
.github/workflows/test.yaml
vendored
6
.github/workflows/test.yaml
vendored
|
@ -19,6 +19,8 @@ jobs:
|
|||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
CI: true
|
||||
TEST_LOG_TRUNCATE: 340
|
||||
TEST_LOG_LEVEL: error
|
||||
SECRET_KEY_BASE: "kSNSvYkWk14onNdbYzhEqFyG5TzpOO9+FFlk5sIrhTk0RV6+FeL/nM8DWQffDah4woepgQdrP6J8cjWGyehcWcRWvIIWXsghp0yY9/fEjgfUekD15P9LGRCmu6exIQ6g"
|
||||
SIGNING_SALT: "NPkqpeTx/q9xGQRWwRpqBWI7bCxeHMAF4L2PHntfjVtd8GZD2BQKe9KLnkIR5WbLVdZt24FWuR+Hy5WoXaZM4APydGvC2+w2enJmskOckX5VY1Bpvm7JGKu+QymgIgK/"
|
||||
ENCRYPTION_SALT: "l+QT/gkdX722f57qSAUc+bZcqm5ZduXY4D0hp0glEiKdR267JsZ1/CZlrlhADcD8kzuaZGFWvJ2dlr6sujbzGQV5e04lKVIsZh3gfd8eqQBckIqH6L8TDRRz4M07YE+F"
|
||||
|
@ -84,8 +86,8 @@ jobs:
|
|||
run: mix bonfire.deps.update
|
||||
- name: Fetch any differences in nested deps (+ run post-install setup)
|
||||
run: just deps-get && just pre-init
|
||||
- name: Clean-build Bonfire data extensions
|
||||
run: mix bonfire.deps.clean.data
|
||||
# - name: Clean-build Bonfire data extensions
|
||||
# run: mix bonfire.deps.clean.data
|
||||
- name: Compile deps & app
|
||||
run: mix compile
|
||||
- name: Set up database
|
||||
|
|
|
@ -21,16 +21,22 @@ config :bonfire_search,
|
|||
|
||||
## Other general test config
|
||||
|
||||
truncate = case System.get_env("TEST_LOG_TRUNCATE", "1000") do
|
||||
"0" -> :infinity
|
||||
truncate -> String.to_integer(truncate)
|
||||
end
|
||||
|
||||
config :logger,
|
||||
level: :error,
|
||||
truncate: :infinity
|
||||
level: String.to_existing_atom(System.get_env("TEST_LOG_LEVEL", "info")),
|
||||
truncate: truncate
|
||||
|
||||
config :logger, :console, truncate: truncate
|
||||
|
||||
if !test_instance? do
|
||||
# to supress non-captured logs in tests (eg. in setup_all)
|
||||
config :logger, backends: []
|
||||
end
|
||||
|
||||
config :logger, :console, truncate: :infinity
|
||||
|
||||
# Configure your database
|
||||
# db = "bonfire_test#{System.get_env("MIX_TEST_PARTITION")}"
|
||||
|
|
Loading…
Reference in a new issue