Skip to content

Commit e31ebd4

Browse files
committed
chore: update dependencies and GitHub Actions configuration
1 parent f88bdf7 commit e31ebd4

File tree

6 files changed

+35
-38
lines changed

6 files changed

+35
-38
lines changed

.github/workflows/private-elixir-library-w-git-ops.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ on: push
33
name: Privately published Elixir Library (with git ops)
44

55
env:
6-
ELIXIR_VERSION: "1.11.4"
7-
OTP_VERSION: "22.3.1"
6+
ELIXIR_VERSION: "1.14.5-otp-24"
7+
OTP_VERSION: "24.3.4.17"
88

99
jobs:
1010
deps:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-24.04
1212
env:
1313
NARRATIVE_HEX_ORG_API_KEY: ${{ secrets.NARRATIVE_HEX_ORG_API_KEY }}
1414
MIX_ENV: test
@@ -29,13 +29,14 @@ jobs:
2929
key: ${{ runner.os }}-deps
3030
- run: mix deps.get
3131
- name: Uploading dependencies for other jobs
32-
uses: actions/upload-artifact@v2
32+
uses: actions/upload-artifact@v4
3333
with:
3434
name: deps
3535
path: deps/
36+
include-hidden-files: true
3637

3738
build:
38-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-24.04
3940
needs: ["deps"]
4041
env:
4142
MIX_ENV: test
@@ -48,7 +49,7 @@ jobs:
4849
otp-version: ${{ env.OTP_VERSION }}
4950
elixir-version: ${{ env.ELIXIR_VERSION }}
5051
- name: Downloading dependencies
51-
uses: actions/download-artifact@v2
52+
uses: actions/download-artifact@v4
5253
with:
5354
name: deps
5455
path: deps/
@@ -60,13 +61,13 @@ jobs:
6061
- name: Run `mix compile`
6162
run: mix deps.compile && mix compile
6263
- name: Uploading build artifacts for other jobs
63-
uses: actions/upload-artifact@v2
64+
uses: actions/upload-artifact@v4
6465
with:
6566
name: build
6667
path: _build/
6768

6869
credo:
69-
runs-on: ubuntu-20.04
70+
runs-on: ubuntu-24.04
7071
needs: ["deps", "build"]
7172
env:
7273
MIX_ENV: test
@@ -79,19 +80,19 @@ jobs:
7980
otp-version: ${{ env.OTP_VERSION }}
8081
elixir-version: ${{ env.ELIXIR_VERSION }}
8182
- name: Downloading dependencies
82-
uses: actions/download-artifact@v2
83+
uses: actions/download-artifact@v4
8384
with:
8485
name: deps
8586
path: deps/
8687
- name: Downloading build artifacts
87-
uses: actions/download-artifact@v2
88+
uses: actions/download-artifact@v4
8889
with:
8990
name: build
9091
path: _build/
9192
- run: mix credo --strict
9293

9394
formatter:
94-
runs-on: ubuntu-20.04
95+
runs-on: ubuntu-24.04
9596
steps:
9697
- name: Checking out project
9798
uses: actions/checkout@v2
@@ -103,7 +104,7 @@ jobs:
103104
- run: mix format --check-formatted
104105

105106
audit:
106-
runs-on: ubuntu-20.04
107+
runs-on: ubuntu-24.04
107108
needs: ["deps"]
108109
env:
109110
NARRATIVE_HEX_ORG_API_KEY: ${{ secrets.NARRATIVE_HEX_ORG_API_KEY }}
@@ -118,14 +119,14 @@ jobs:
118119
elixir-version: ${{ env.ELIXIR_VERSION }}
119120
- run: mix hex.organization auth narrativeapp --key $NARRATIVE_HEX_ORG_API_KEY
120121
- name: Downloading dependencies
121-
uses: actions/download-artifact@v2
122+
uses: actions/download-artifact@v4
122123
with:
123124
name: deps
124125
path: deps/
125126
- run: mix hex.audit
126127

127128
test:
128-
runs-on: ubuntu-20.04
129+
runs-on: ubuntu-24.04
129130
needs: ["deps", "build"]
130131
env:
131132
MIX_ENV: test
@@ -138,19 +139,19 @@ jobs:
138139
otp-version: ${{ env.OTP_VERSION }}
139140
elixir-version: ${{ env.ELIXIR_VERSION }}
140141
- name: Downloading dependencies
141-
uses: actions/download-artifact@v2
142+
uses: actions/download-artifact@v4
142143
with:
143144
name: deps
144145
path: deps/
145146
- name: Downloading build artifacts
146-
uses: actions/download-artifact@v2
147+
uses: actions/download-artifact@v4
147148
with:
148149
name: build
149150
path: _build/
150151
- run: mix test
151152

152153
is_releasable:
153-
runs-on: ubuntu-20.04
154+
runs-on: ubuntu-24.04
154155
needs: ["deps", "test", "audit", "formatter", "credo"]
155156
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/master'}}
156157
env:
@@ -164,12 +165,12 @@ jobs:
164165
otp-version: ${{ env.OTP_VERSION }}
165166
elixir-version: ${{ env.ELIXIR_VERSION }}
166167
- name: Downloading dependencies
167-
uses: actions/download-artifact@v2
168+
uses: actions/download-artifact@v4
168169
with:
169170
name: deps
170171
path: deps/
171172
- name: Downloading build artifacts
172-
uses: actions/download-artifact@v2
173+
uses: actions/download-artifact@v4
173174
with:
174175
name: build
175176
path: _build/
@@ -179,20 +180,20 @@ jobs:
179180
- name: Run mix hex.build
180181
run: mix hex.build -o ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
181182
- name: Uploading hex package as job artifact
182-
uses: actions/upload-artifact@v2
183+
uses: actions/upload-artifact@v4
183184
with:
184185
name: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
185186
path: ${{ steps.app-info.outputs.app_name }}-${{ steps.app-info.outputs.app_version }}.tar
186187
- name: Run mix docs
187188
run: MIX_ENV=test mix docs && tar zcvf docs.tar.gz doc/
188189
- name: Uploading documentation as job artifact
189-
uses: actions/upload-artifact@v2
190+
uses: actions/upload-artifact@v4
190191
with:
191192
name: ${{ steps.app-info.outputs.app_name }}-docs-${{ steps.app-info.outputs.app_version }}.tar.gz
192193
path: docs.tar.gz
193194

194195
git_ops:
195-
runs-on: ubuntu-20.04
196+
runs-on: ubuntu-24.04
196197
needs: ["deps", "test", "audit", "formatter", "credo"]
197198
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
198199
env:
@@ -208,12 +209,12 @@ jobs:
208209
otp-version: ${{ env.OTP_VERSION }}
209210
elixir-version: ${{ env.ELIXIR_VERSION }}
210211
- name: Downloading dependencies
211-
uses: actions/download-artifact@v2
212+
uses: actions/download-artifact@v4
212213
with:
213214
name: deps
214215
path: deps/
215216
- name: Downloading build artifacts
216-
uses: actions/download-artifact@v2
217+
uses: actions/download-artifact@v4
217218
with:
218219
name: build
219220
path: _build/

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
elixir 1.14.5-otp-24
2+
erlang 24.3.4.17

lib/dogstatsd/statsd.ex

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,8 @@ defmodule DogStatsd.Statsd do
5151
def add_tags(event, []), do: event
5252

5353
def add_tags(event, tags) do
54-
tags =
55-
tags
56-
|> Enum.map(&rm_pipes/1)
57-
|> Enum.join(",")
58-
59-
"#{event}|##{tags}"
54+
tags_string = Enum.map_join(tags, ",", &rm_pipes/1)
55+
"#{event}|##{tags_string}"
6056
end
6157

6258
def increment(dogstatsd, stat, opts \\ %{}) do

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule DogStatsd.MixProject do
3333
# Type `mix help deps` for more examples and options
3434
defp deps do
3535
[
36-
{:credo, "~> 1.5.1", only: ~w[dev test]a, runtime: false},
36+
{:credo, "~> 1.6", only: ~w[dev test]a, runtime: false},
3737
{:ex_doc, ">= 0.0.0", only: ~w[dev test]a},
3838
{:excoveralls, "~> 0.14.0", only: ~w[dev test]a},
3939
{:git_ops, "~> 2.2", only: ~w[dev test]a, runtime: false}

mix.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
%{
2-
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
2+
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
33
"certifi": {:hex, :certifi, "2.5.3", "70bdd7e7188c804f3a30ee0e7c99655bc35d8ac41c23e12325f36ab449b70651", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "ed516acb3929b101208a9d700062d520f3953da3b6b918d866106ffa980e1c10"},
4-
"credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [: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", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"},
4+
"credo": {:hex, :credo, "1.7.11", "d3e805f7ddf6c9c854fd36f089649d7cf6ba74c42bc3795d587814e3c9847102", [: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", "56826b4306843253a66e47ae45e98e7d284ee1f95d53d1612bb483f88a8cf219"},
55
"earmark": {:hex, :earmark, "1.2.0", "bf1ce17aea43ab62f6943b97bd6e3dc032ce45d4f787504e3adf738e54b42f3a", [:mix], [], "hexpm", "6709251dd10e70cca0d50be8a25adc38c701b39eac2da3b1c166e3e7e4d358ed"},
66
"earmark_parser": {:hex, :earmark_parser, "1.4.12", "b245e875ec0a311a342320da0551da407d9d2b65d98f7a9597ae078615af3449", [:mix], [], "hexpm", "711e2cc4d64abb7d566d43f54b78f7dc129308a63bc103fbd88550d2174b3160"},
77
"ex_doc": {:hex, :ex_doc, "0.24.0", "2df14354835afaabdf87cb2971ea9485d8a36ff590e4b6c250b4f60c8fdf9143", [: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", "a0f4bcff21ceebea48414e49885d2a3e542200f76a2facf3f8faa54935eeb721"},
88
"excoveralls": {:hex, :excoveralls, "0.14.0", "4b562d2acd87def01a3d1621e40037fdbf99f495ed3a8570dfcf1ab24e15f76d", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "94f17478b0cca020bcd85ce7eafea82d2856f7ed022be777734a2f864d36091a"},
99
"exjsx": {:hex, :exjsx, "3.2.1", "1bc5bf1e4fd249104178f0885030bcd75a4526f4d2a1e976f4b428d347614f0f", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "b55727b206dab96feb025267e5c122ddb448f55b6648f9156b8d481215d80290"},
10-
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
10+
"file_system": {:hex, :file_system, "1.1.0", "08d232062284546c6c34426997dd7ef6ec9f8bbd090eb91780283c9016840e8f", [:mix], [], "hexpm", "bfcf81244f416871f2a2e15c1b515287faa5db9c6bcf290222206d120b3d43f6"},
1111
"git_cli": {:hex, :git_cli, "0.3.0", "a5422f9b95c99483385b976f5d43f7e8233283a47cda13533d7c16131cb14df5", [:mix], [], "hexpm", "78cb952f4c86a41f4d3511f1d3ecb28edb268e3a7df278de2faa1bd4672eaf9b"},
1212
"git_ops": {:hex, :git_ops, "2.4.2", "291a4f105dfa3d34cffa56cf8faf0e8c2699b49d3316270aa4881e75c62b1832", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "bd9051c49e17d0dc2e0ae9306292f9f5f671d402227f5dda12e69a702198dec4"},
1313
"hackney": {:hex, :hackney, "1.17.0", "717ea195fd2f898d9fe9f1ce0afcc2621a41ecfe137fae57e7fe6e9484b9aa99", [:rebar3], [{:certifi, "~>2.5", [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.3", [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", "64c22225f1ea8855f584720c0e5b3cd14095703af1c9fbc845ba042811dc671c"},
1414
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
15-
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
15+
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
1616
"jsex": {:hex, :jsex, "2.0.0", "d54a39e49418b34b1a78236a92f73e4d7c46329c220275d7223fab4b3dc6120f", [:mix], [{:jsx, "~> 2.0", [hex: :jsx, optional: false]}]},
1717
"jsx": {:hex, :jsx, "2.8.2", "7acc7d785b5abe8a6e9adbde926a24e481f29956dd8b4df49e3e4e7bcc92a018", [:mix, :rebar3], [], "hexpm", "b4c5d3230b397c8d95579e4a3d72826bb6463160130ccf4182f5be8579b5f44c"},
1818
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},

test/dogstatsd_test.exs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,7 @@ defmodule DogStatsdTest do
357357
# We should receive a packet of 50 messages that was automatically
358358
# flushed when the buffer got too big
359359
theoretical_reply =
360-
Enum.into(1..50, [])
361-
|> Enum.map(fn _ -> "mycounter:1|c" end)
362-
|> Enum.join("\n")
360+
Enum.map_join(1..50, "\n", fn _ -> "mycounter:1|c" end)
363361
|> String.to_charlist()
364362

365363
assert_receive {:udp, _port, _from_ip, _from_port, ^theoretical_reply}

0 commit comments

Comments
 (0)