Skip to content

Commit

Permalink
Add newer Elixir versions on CI (#83)
Browse files Browse the repository at this point in the history
* add more versions in metrix test

* format using latest Elixir and Erlang/OTP

* remove meaningless config to supress warning

```
warning: use Mix.Config is deprecated. Use the Config module instead
Warning:   config/config.exs:1
```

* mix format

* use latest dialyxir to work on Elixir 1.15

* use latest minor versions

Co-authored-by: Arek Gil <[email protected]>

* remove OTP 22

---------

Co-authored-by: Arek Gil <[email protected]>
  • Loading branch information
mopp and arkgil authored Aug 25, 2023
1 parent 2823f4a commit 7af8103
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: "24.0"
elixir-version: "1.12.0"
otp-version: "26.0"
elixir-version: "1.15.4"
- uses: actions/cache@v2
name: Cache dependencies
with:
Expand All @@ -37,10 +37,14 @@ jobs:
fail-fast: false
matrix:
include:
- otp: 22.3
elixir: 1.10.4
- otp: 24.0
elixir: 1.12.0
- otp: 24.3
elixir: 1.13.4
- otp: 25.3
elixir: 1.14.5
- otp: 26.0
elixir: 1.15.4
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
Expand Down Expand Up @@ -75,10 +79,14 @@ jobs:
fail-fast: false
matrix:
include:
- otp: 22.3
elixir: 1.10.4
- otp: 24.0
elixir: 1.12.0
- otp: 24.3
elixir: 1.13.4
- otp: 25.3
elixir: 1.14.5
- otp: 26.0
elixir: 1.15.4
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
Expand Down
1 change: 0 additions & 1 deletion config/config.exs

This file was deleted.

2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ defmodule TelemetryMetricsStatsd.MixProject do
{:telemetry_metrics, "~> 0.6"},
{:nimble_options, "~> 0.4 or ~> 1.0"},
{:stream_data, "~> 0.4", only: :test},
{:dialyxir, "~> 0.5", only: :test, runtime: false},
{:dialyxir, "~> 1.3", only: :test, runtime: false},
{:ex_doc, "~> 0.19", only: :docs},
{:liveness, "~> 1.0", only: :test},
{:mock, "~> 0.3.5", only: :test}
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%{
"certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"},
"dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm", "6c32a70ed5d452c6650916555b1f96c79af5fc4bf286997f8b15f213de786f73"},
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
"earmark": {:hex, :earmark, "1.4.4", "4821b8d05cda507189d51f2caeef370cf1e18ca5d7dfb7d31e9cafe6688106a4", [:mix], [], "hexpm", "1f93aba7340574847c0f609da787f0d79efcab51b044bb6e242cae5aca9d264d"},
"earmark_parser": {:hex, :earmark_parser, "1.4.13", "0c98163e7d04a15feb62000e1a891489feb29f3d10cb57d4f845c405852bbef8", [:mix], [], "hexpm", "d602c26af3a0af43d2f2645613f65841657ad6efc9f0e361c3b6c06b578214ba"},
"erlex": {:hex, :erlex, "0.2.1", "cee02918660807cbba9a7229cae9b42d1c6143b768c781fa6cee1eaf03ad860b", [:mix], [], "hexpm"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [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", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
"hackney": {:hex, :hackney, "1.15.1", "9f8f471c844b8ce395f7b6d8398139e26ddca9ebc171a8b91342ee15a19963f4", [:rebar3], [{:certifi, "2.5.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},
"idna": {:hex, :idna, "6.0.0", "689c46cbcdf3524c44d5f3dde8001f364cd7608a99556d8fbd8239a5798d4c10", [:rebar3], [{:unicode_util_compat, "0.4.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"},
Expand Down
4 changes: 2 additions & 2 deletions test/telemetry_metrics_statsd_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ defmodule TelemetryMetricsStatsdTest do
assert udp.host == {127, 0, 0, 1}

with_mock :inet, [:passthrough, :unstick],
gethostbyname: fn _ -> {:ok, {:hostent, 'localhost', [], :inet, 4, [{10, 0, 0, 0}]}} end do
gethostbyname: fn _ -> {:ok, {:hostent, ~c"localhost", [], :inet, 4, [{10, 0, 0, 0}]}} end do
assert_raise Liveness, fn ->
eventually(fn ->
{:ok, udp} = TelemetryMetricsStatsd.get_udp(pool_id)
Expand All @@ -664,7 +664,7 @@ defmodule TelemetryMetricsStatsdTest do
assert udp.host == {127, 0, 0, 1}

with_mock :inet, [:passthrough, :unstick],
gethostbyname: fn _ -> {:ok, {:hostent, 'localhost', [], :inet, 4, [{10, 0, 0, 0}]}} end do
gethostbyname: fn _ -> {:ok, {:hostent, ~c"localhost", [], :inet, 4, [{10, 0, 0, 0}]}} end do
eventually(fn ->
{:ok, udp} = TelemetryMetricsStatsd.get_udp(pool_id)
assert udp.host == {10, 0, 0, 0}
Expand Down

0 comments on commit 7af8103

Please sign in to comment.