Skip to content

Commit

Permalink
fix: git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Sep 8, 2024
1 parent 22bf94d commit 605d1e5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
19 changes: 0 additions & 19 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,4 @@ config :logger, :console,

config :phoenix, :json_library, Jason

config :git_hooks,
verbose: false,
auto_install: true,
branches: [
whitelist: ["main"]
],
hooks: [
pre_push: [
tasks: [
"mix clean",
"mix compile --warning-as-errors",
"mix format --check-formatted",
"mix credo --strict",
"mix test --only unit",
"mix test --only integration"
]
]
]

import_config "#{config_env()}.exs"
23 changes: 23 additions & 0 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,26 @@ config :phoenix, :stacktrace_depth, 20

# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime

config :git_hooks,
verbose: false,
auto_install: true,
branches: [
whitelist: ["main"]
],
hooks: [
pre_push: [
tasks: [
{:mix_task, :clean},
{:mix_task, :compile, ["--force"]},
{:mix_task, :format, ["--check-formatted"]},
{:mix_task, :credo, ["--strict"]},
{:mix_task, :test, ["--only", "unit"]},
{:mix_task, :test, ["--only", "integration"]}
]
]
],
extra_success_returns: [
{:noop, []},
{:ok, []}
]
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defmodule Pescarte.MixProject do
deps: deps(),
aliases: aliases(),
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [warnings_as_errors: true],
releases: [
pescarte: [
strip_beams: true,
Expand Down Expand Up @@ -77,7 +78,7 @@ defmodule Pescarte.MixProject do
{:dialyxir, "~> 1.3", only: [:dev], runtime: false},
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
# {:ex_doc, "> 0.0.0", only: [:dev, :test], runtime: false},
{:git_hooks, "~> 0.4.0", only: [:test, :dev], runtime: false}
{:git_hooks, "~> 0.8.0-pre0", only: [:dev], runtime: false}
]
end

Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"fss": {:hex, :fss, "0.1.1", "9db2344dbbb5d555ce442ac7c2f82dd975b605b50d169314a20f08ed21e08642", [:mix], [], "hexpm", "78ad5955c7919c3764065b21144913df7515d52e228c09427a004afe9c1a16b0"},
"gen_stage": {:hex, :gen_stage, "1.2.1", "19d8b5e9a5996d813b8245338a28246307fd8b9c99d1237de199d21efc4c76a1", [:mix], [], "hexpm", "83e8be657fa05b992ffa6ac1e3af6d57aa50aace8f691fcf696ff02f8335b001"},
"gettext": {:hex, :gettext, "0.24.0", "6f4d90ac5f3111673cbefc4ebee96fe5f37a114861ab8c7b7d5b30a1108ce6d8", [:mix], [{:expo, "~> 0.5.1", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "bdf75cdfcbe9e4622dd18e034b227d77dd17f0f133853a1c73b97b3d6c770e8b"},
"git_hooks": {:hex, :git_hooks, "0.4.2", "93604c8f6dff28500aaecc1988de319308fb7aa2c27bc89460b1f48aedd8bf7a", [:mix], [{:blankable, "~> 1.0.0", [hex: :blankable, repo: "hexpm", optional: false]}, {:recase, "~> 0.6.0", [hex: :recase, repo: "hexpm", optional: false]}], "hexpm", "0e46c04847b86d88857149840a614e018d57f79ca3f3b921a93e007cbea546d4"},
"git_hooks": {:hex, :git_hooks, "0.8.0-pre0", "fea247cf08699cd1ddd6d54f6fa9c05196e56a23659c5b2f68f9aba54709fb0f", [:mix], [{:blankable, "~> 1.0.0", [hex: :blankable, repo: "hexpm", optional: false]}, {:recase, "~> 0.7.0", [hex: :recase, repo: "hexpm", optional: false]}], "hexpm", "51a50b20cd9910a43e22e4d51d9800cebad88253558ad9e6f55e2ff154c88ccf"},
"gollum": {:hex, :new_gollum, "0.4.0", "89e3e2fc5abd032455341c4a03bcef7042b8d08e02c51df24b99a1a0a1ad69b1", [:mix], [{:httpoison, "~> 1.7", [hex: :httpoison, repo: "hexpm", optional: false]}], "hexpm", "85c68465e8678637638656945677062a4e7086e91a04d5c4bca1027321c74582"},
"hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"},
"hpax": {:hex, :hpax, "1.0.0", "28dcf54509fe2152a3d040e4e3df5b265dcb6cb532029ecbacf4ce52caea3fd2", [:mix], [], "hexpm", "7f1314731d711e2ca5fdc7fd361296593fc2542570b3105595bb0bc6d0fad601"},
Expand Down Expand Up @@ -89,7 +89,7 @@
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"},
"postgrex": {:hex, :postgrex, "0.19.0", "f7d50e50cb42e0a185f5b9a6095125a9ab7e4abccfbe2ab820ab9aa92b71dbab", [: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", "dba2d2a0a8637defbf2307e8629cb2526388ba7348f67d04ec77a5d6a72ecfae"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"recase": {:hex, :recase, "0.6.0", "1dd2dd2f4e06603b74977630e739f08b7fedbb9420cc14de353666c2fc8b99f4", [:mix], [], "hexpm", "8712e318420a228eb2e6366ada230148ed3a4316a798319edd5512f64d78c990"},
"recase": {:hex, :recase, "0.7.0", "3f2f719f0886c7a3b7fe469058ec539cb7bbe0023604ae3bce920e186305e5ae", [:mix], [], "hexpm", "36f5756a9f552f4a94b54a695870e32f4e72d5fad9c25e61bc4a3151c08a4e0c"},
"req": {:hex, :req, "0.4.14", "103de133a076a31044e5458e0f850d5681eef23dfabf3ea34af63212e3b902e2", [:mix], [{:aws_signature, "~> 0.3.2", [hex: :aws_signature, repo: "hexpm", optional: true]}, {:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:nimble_ownership, "~> 0.2.0 or ~> 0.3.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "2ddd3d33f9ab714ced8d3c15fd03db40c14dbf129003c4a3eb80fac2cc0b1b08"},
"resend": {:hex, :resend, "0.4.2", "52f27c83068fbc558cc372df95978fe369da6fb2c7efc83ae316d41afa51bc0b", [:mix], [{:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:swoosh, "~> 1.3", [hex: :swoosh, repo: "hexpm", optional: false]}, {:tesla, "~> 1.5", [hex: :tesla, repo: "hexpm", optional: false]}], "hexpm", "bfec17802467c4a81190c576edcae816e882224c0e90573adae9fb45c29b6528"},
"rewire": {:hex, :rewire, "0.10.0", "129634f6885a74b7f994facf04d3f5375a8c543c4f9a41eab0ad0f8a37fe16f0", [:mix], [], "hexpm", "6fc3532b9972553ab1390567b215b1a78b956c17d2ff0a2823c1dc5d4b273709"},
Expand Down

0 comments on commit 605d1e5

Please sign in to comment.