diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8167f62..d751316 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: otp: ['28', '27', '26'] - elixir: ['1.18', '1.17', '1.16'] + elixir: ['1.19', '1.18', '1.17', '1.16'] exclude: # Unsupported - elixir: '1.17' @@ -26,12 +26,12 @@ jobs: otp: '28' runs-on: 'ubuntu-latest' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: erlef/setup-beam@v1 with: otp-version: ${{ matrix.otp }} elixir-version: ${{ matrix.elixir }} - - uses: actions/cache@v4 + - uses: actions/cache@v5 id: cache with: path: | @@ -43,6 +43,7 @@ jobs: - run: mix hex.audit - run: mix compile --warnings-as-errors - run: mix format --check-formatted + if: ${{ (matrix.otp == '28') && (matrix.elixir >= '1.19' ) }} - run: mix credo --strict --all if: ${{ (matrix.otp == '28') && (matrix.elixir == '1.18' ) }} - run: mix dialyzer diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81af0ec..528fc2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - uses: erlef/setup-beam@v1 with: otp-version: '28' - elixir-version: '1.18' + elixir-version: '1.19' - run: mix deps.get - run: mix compile --warnings-as-errors - run: mix format --check-formatted diff --git a/mix.exs b/mix.exs index 479def0..e6cc3bd 100644 --- a/mix.exs +++ b/mix.exs @@ -16,12 +16,6 @@ defmodule PrometheusEx.Mixfile do name: "Prometheus.ex", deps: deps(), test_coverage: [tool: ExCoveralls], - preferred_cli_env: [ - coveralls: :test, - "coveralls.detail": :test, - "coveralls.post": :test, - "coveralls.html": :test - ], docs: [ main: Prometheus, source_ref: "v#{@version}", @@ -39,6 +33,15 @@ defmodule PrometheusEx.Mixfile do ] end + def cli do + [ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.post": :test, + "coveralls.html": :test + ] + end + def application do [extra_applications: [:logger, :mnesia]] end @@ -67,13 +70,13 @@ defmodule PrometheusEx.Mixfile do defp deps do [ - {:prometheus, "~> 6.0"}, + {:prometheus, "~> 6.1"}, ## test {:credo, "~> 1.0", only: [:dev, :test]}, {:dialyxir, "~> 1.4", only: [:dev]}, {:earmark, "~> 1.4", only: [:dev]}, - {:ex_doc, "~> 0.38", only: [:dev]}, + {:ex_doc, "~> 0.40", only: [:dev]}, {:excoveralls, "~> 0.18", only: [:test]} ] end diff --git a/mix.lock b/mix.lock index 265dbb4..0e42fd2 100644 --- a/mix.lock +++ b/mix.lock @@ -1,18 +1,18 @@ %{ "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, - "credo": {:hex, :credo, "1.7.12", "9e3c20463de4b5f3f23721527fcaf16722ec815e70ff6c60b86412c695d426c1", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8493d45c656c5427d9c729235b99d498bd133421f3e0a683e5c1b561471291e5"}, - "ddskerl": {:hex, :ddskerl, "0.4.1", "f0329e1f8fd3c6209f1645b540f6d4fc14c60b897b05e65b8a4122a362ef019a", [:rebar3], [], "hexpm", "0b68a1e53af4ccf5f43d70f8eaba1f031388b3fcbd6405fa0cdf849fb47f1811"}, - "dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"}, + "credo": {:hex, :credo, "1.7.16", "a9f1389d13d19c631cb123c77a813dbf16449a2aebf602f590defa08953309d4", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d0562af33756b21f248f066a9119e3890722031b6d199f22e3cf95550e4f1579"}, + "ddskerl": {:hex, :ddskerl, "0.4.3", "bb97b90eef1b5906520cebdd38da29b18a770b5567f6297927f53566eae9bebb", [:rebar3], [], "hexpm", "4e0f6047c6a002ce38f6ea155276dd918cd635fd0a5edb9e0b46aeb6f7aff2c2"}, + "dialyxir": {:hex, :dialyxir, "1.4.7", "dda948fcee52962e4b6c5b4b16b2d8fa7d50d8645bbae8b8685c3f9ecb7f5f4d", [:mix], [{:erlex, ">= 0.2.8", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b34527202e6eb8cee198efec110996c25c5898f43a4094df157f8d28f27d9efe"}, "earmark": {:hex, :earmark, "1.4.48", "5f41e579d85ef812351211842b6e005f6e0cef111216dea7d4b9d58af4608434", [:mix], [], "hexpm", "a461a0ddfdc5432381c876af1c86c411fd78a25790c75023c7a4c035fdc858f9"}, "earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"}, - "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, - "ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"}, + "erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"}, + "ex_doc": {:hex, :ex_doc, "0.40.1", "67542e4b6dde74811cfd580e2c0149b78010fd13001fda7cfeb2b2c2ffb1344d", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "bcef0e2d360d93ac19f01a85d58f91752d930c0a30e2681145feea6bd3516e00"}, "excoveralls": {:hex, :excoveralls, "0.18.5", "e229d0a65982613332ec30f07940038fe451a2e5b29bce2a5022165f0c9b157e", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "523fe8a15603f86d64852aab2abe8ddbd78e68579c8525ae765facc5eae01562"}, - "file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"}, + "file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, - "makeup_erlang": {:hex, :makeup_erlang, "1.0.2", "03e1804074b3aa64d5fad7aa64601ed0fb395337b982d9bcf04029d68d51b6a7", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "af33ff7ef368d5893e4a267933e7744e46ce3cf1f61e2dccf53a111ed3aa3727"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.3", "4252d5d4098da7415c390e847c814bad3764c94a814a0b4245176215615e1035", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "953297c02582a33411ac6208f2c6e55f0e870df7f80da724ed613f10e6706afd"}, "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"}, - "prometheus": {:hex, :prometheus, "6.0.2", "44a6ee8393b7c592e18f73a9044d1e17527244423a2ee548f639519033543a4c", [:rebar3], [{:ddskerl, "0.4.1", [hex: :ddskerl, repo: "hexpm", optional: false]}], "hexpm", "061b22782c8a0a8a1e7105f9176a097699e08cf34d6eba70b9710f2905ae6993"}, + "prometheus": {:hex, :prometheus, "6.1.2", "e5c3c567cd8b0994425920763405635211183c15bdc47d0cd524807dde20ca1d", [:rebar3], [{:ddskerl, "0.4.3", [hex: :ddskerl, repo: "hexpm", optional: false]}], "hexpm", "109662001328112b860de112d49b575310be8ff33fe04bf0482eec4b1e5a1278"}, } diff --git a/test/format/protobuf_test.exs b/test/format/protobuf_test.exs index 2c678e1..167e014 100644 --- a/test/format/protobuf_test.exs +++ b/test/format/protobuf_test.exs @@ -37,8 +37,8 @@ defmodule Prometheus.Format.ProtobufTest do Counter.inc([name: :dtest], 1.5) assert <<29, 10, 5, 100, 116, 101, 115, 116, 18, 5, 113, 119, 34, 92, 101, 24, 0, 34, - 11, 26, 9, 9, 0, 0, 0, 0, 0, 0, 26, - 64>> == Prometheus.Format.Protobuf.format() + 11, 26, 9, 9, 0, 0, 0, 0, 0, 0, 26, 64>> == + Prometheus.Format.Protobuf.format() end test "summary" do @@ -49,8 +49,8 @@ defmodule Prometheus.Format.ProtobufTest do assert <<63, 10, 14, 111, 114, 100, 101, 114, 115, 95, 115, 117, 109, 109, 97, 114, 121, 18, 28, 84, 114, 97, 99, 107, 32, 111, 114, 100, 101, 114, 115, 32, 99, 111, 117, 110, 116, 47, 116, 111, 116, 97, 108, 32, 115, 117, 109, 24, 2, 34, - 13, 34, 11, 8, 2, 17, 0, 0, 0, 0, 0, 0, 57, - 64>> == Prometheus.Format.Protobuf.format() + 13, 34, 11, 8, 2, 17, 0, 0, 0, 0, 0, 0, 57, 64>> == + Prometheus.Format.Protobuf.format() end test "dsummary" do @@ -59,8 +59,8 @@ defmodule Prometheus.Format.ProtobufTest do Summary.observe([name: :dsummary], 2.7) assert <<32, 10, 8, 100, 115, 117, 109, 109, 97, 114, 121, 18, 3, 113, 119, 101, 24, - 2, 34, 13, 34, 11, 8, 2, 17, 205, 204, 204, 204, 204, 204, 16, - 64>> == Prometheus.Format.Protobuf.format() + 2, 34, 13, 34, 11, 8, 2, 17, 205, 204, 204, 204, 204, 204, 16, 64>> == + Prometheus.Format.Protobuf.format() end test "histogram" do @@ -91,8 +91,8 @@ defmodule Prometheus.Format.ProtobufTest do 8, 3, 17, 0, 0, 0, 0, 0, 0, 89, 64, 26, 11, 8, 6, 17, 0, 0, 0, 0, 0, 192, 114, 64, 26, 11, 8, 7, 17, 0, 0, 0, 0, 0, 64, 127, 64, 26, 11, 8, 8, 17, 0, 0, 0, 0, 0, 112, 135, 64, 26, 11, 8, 9, 17, 0, 0, 0, 0, 0, 64, 143, 64, 26, - 11, 8, 9, 17, 0, 0, 0, 0, 0, 0, 240, - 127>> == Prometheus.Format.Protobuf.format() + 11, 8, 9, 17, 0, 0, 0, 0, 0, 0, 240, 127>> == + Prometheus.Format.Protobuf.format() end test "dhistogram" do @@ -143,7 +143,7 @@ defmodule Prometheus.Format.ProtobufTest do 64, 26, 11, 8, 0, 17, 0, 0, 0, 0, 0, 0, 89, 64, 26, 11, 8, 1, 17, 0, 0, 0, 0, 0, 192, 114, 64, 26, 11, 8, 2, 17, 0, 0, 0, 0, 0, 64, 127, 64, 26, 11, 8, 3, 17, 0, 0, 0, 0, 0, 112, 135, 64, 26, 11, 8, 5, 17, 0, 0, 0, 0, 0, 64, 143, - 64, 26, 11, 8, 6, 17, 0, 0, 0, 0, 0, 0, 240, - 127>> == Prometheus.Format.Protobuf.format() + 64, 26, 11, 8, 6, 17, 0, 0, 0, 0, 0, 0, 240, 127>> == + Prometheus.Format.Protobuf.format() end end