Skip to content

Commit 6476b07

Browse files
committed
chore(cicd): enable pre-commit
Signed-off-by: WoodenMaiden <[email protected]>
1 parent 61dd485 commit 6476b07

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

config/config.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ config :logger, :console,
4848
config :phoenix, :json_library, Jason
4949
config :phoenix_swagger, json_library: Jason
5050

51+
config :pre_commit, commands: ["format --check-formatted"], verbose: true
52+
5153
# Import environment specific config. This must remain at the bottom
5254
# of this file so it overrides the configuration defined above.
5355
import_config "#{config_env()}.exs"

config/test.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ config :testcontainers,
44
log_level: :debug,
55
enabled: true
66

7-
87
# Configure your database
98
#
109
# The MIX_TEST_PARTITION environment variable can be used

mix.exs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ defmodule TimecopsyncProjectsApi.MixProject do
4949
{:phoenix_swagger, "~> 0.8"},
5050
{:testcontainers, "~> 1.10"},
5151
# optional
52-
{:ex_json_schema, "~> 0.5"}
52+
{:ex_json_schema, "~> 0.5"},
53+
{:pre_commit, "~> 0.3.4", only: :dev}
5354
]
5455
end
5556

@@ -66,7 +67,8 @@ defmodule TimecopsyncProjectsApi.MixProject do
6667
"ecto.reset": ["ecto.drop", "ecto.setup"],
6768
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
6869
swagger: ["phx.swagger.generate"],
69-
tc: [ "testcontainers.test", "--database", "postgres" ] # run tests with testcontainers
70+
# run tests with testcontainers
71+
tc: ["testcontainers.test", "--database", "postgres"]
7072
]
7173
end
7274

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
3434
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
3535
"postgrex": {:hex, :postgrex, "0.19.1", "73b498508b69aded53907fe48a1fee811be34cc720e69ef4ccd568c8715495ea", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8bac7885a18f381e091ec6caf41bda7bb8c77912bb0e9285212829afe5d8a8f8"},
36+
"pre_commit": {:hex, :pre_commit, "0.3.4", "e2850f80be8090d50ad8019ef2426039307ff5dfbe70c736ad0d4d401facf304", [:mix], [], "hexpm", "16f684ba4f1fed1cba6b19e082b0f8d696e6f1c679285fedf442296617ba5f4e"},
3637
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
3738
"table_rex": {:hex, :table_rex, "4.0.0", "3c613a68ebdc6d4d1e731bc973c233500974ec3993c99fcdabb210407b90959b", [:mix], [], "hexpm", "c35c4d5612ca49ebb0344ea10387da4d2afe278387d4019e4d8111e815df8f55"},
3839
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},

0 commit comments

Comments
 (0)