From 7d9b5c5083d87193a737ee5f03f82bdd2153d477 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Lazo Date: Fri, 6 Jan 2023 12:21:41 -0500 Subject: [PATCH] chore: add dialyzer to pipeline --- .github/workflows/ci.yml | 7 +++++++ .gitignore | 4 +++- mix.exs | 6 +++++- mix.lock | 2 ++ priv/plts/.gitkeep | 0 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 priv/plts/.gitkeep diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 095dcc5..01567bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,6 +75,13 @@ jobs: - name: Credo run: mix credo + - name: Create Dialyzer PLTs + if: steps.plt_cache.outputs.cache-hit != 'true' + run: mix dialyzer --plt + + - name: Run dialyzer + run: mix dialyzer --format github + publish-hex-package: name: Publish Hex Package ⬆️☁️ runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index e89b9eb..00a75bf 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ erl_crash.dump # Ignore package tarball (built via "mix hex.build"). spear-*.tar - # Temporary files for e.g. tests /tmp + +/priv/plts/*.plt +/priv/plts/*.plt.hash diff --git a/mix.exs b/mix.exs index 5c37f2c..efd1fef 100644 --- a/mix.exs +++ b/mix.exs @@ -32,7 +32,10 @@ defmodule Spear.MixProject do deps: deps(), docs: docs(), package: package(), - description: description() + description: description(), + dialyzer: [ + plt_file: {:no_warn, "priv/plts/dialyzer.plt"} + ] ] end @@ -54,6 +57,7 @@ defmodule Spear.MixProject do # dev/test utilities {:castore, ">= 0.0.0", only: [:dev, :test]}, {:ex_doc, "~> 0.24", only: :dev, runtime: false}, + {:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false}, # testing suite {:credo, "~> 1.5", only: :test}, {:bless, "~> 1.0", only: :test}, diff --git a/mix.lock b/mix.lock index 99a4246..60c4319 100644 --- a/mix.lock +++ b/mix.lock @@ -5,7 +5,9 @@ "certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"}, "connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"}, "credo": {:hex, :credo, "1.5.6", "e04cc0fdc236fefbb578e0c04bd01a471081616e741d386909e527ac146016c6", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "4b52a3e558bd64e30de62a648518a5ea2b6e3e5d2b164ef5296244753fc7eb17"}, + "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "event_store_db_gpb_protobufs": {:hex, :event_store_db_gpb_protobufs, "2.2.0", "fca2bdeac5fca205e02d3cb9f170477a5422e147413d21d07c19e1ffc70e66aa", [:rebar3], [{:gpb, "~> 4.0", [hex: :gpb, repo: "hexpm", optional: false]}], "hexpm", "dad49149eb6913805277a698ec1f607aac945c40cbf427aa03cc97309fdf2f1f"}, "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, "excoveralls": {:hex, :excoveralls, "0.14.1", "14140e4ef343f2af2de33d35268c77bc7983d7824cb945e6c2af54235bc2e61f", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "4a588f9f8cf9dc140cc1f3d0ea4d849b2f76d5d8bee66b73c304bb3d3689c8b0"}, diff --git a/priv/plts/.gitkeep b/priv/plts/.gitkeep new file mode 100644 index 0000000..e69de29