Skip to content

Commit

Permalink
chore: upgrade CI to elixir 1.15 and otp 26.1
Browse files Browse the repository at this point in the history
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
  • Loading branch information
yordis committed Apr 18, 2024
1 parent 40966e5 commit af99950
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13'
otp-version: '24.3'
elixir-version: '1.16'
otp-version: '26.2'
version-type: strict
- name: Restore dependencies cache
uses: actions/cache@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
strategy:
matrix:
elixir:
- 1.14
- 1.13
- 1.16
- 1.15
otp:
- 26.2
- 25.3
- 24.3
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13'
otp-version: '24.3'
elixir-version: '1.15'
otp-version: '26.1'
version-type: strict
- name: Restore dependencies cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion lib/tesla/adapter/hackney.ex
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if Code.ensure_loaded?(:hackney) do
end

defp request(method, url, headers, body, opts) do
handle(:hackney.request(method, url, headers, body || '', opts), opts)
handle(:hackney.request(method, url, headers, body || ~c"", opts), opts)
end

defp request_stream(method, url, headers, body, opts) do
Expand Down
4 changes: 2 additions & 2 deletions lib/tesla/adapter/httpc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ defmodule Tesla.Adapter.Httpc do
headers = for {key, value} <- headers, do: {to_charlist(key), to_charlist(value)}

{content_type, headers} =
case List.keytake(headers, 'content-type', 0) do
nil -> {'text/plain', headers}
case List.keytake(headers, ~c"content-type", 0) do
nil -> {~c"text/plain", headers}
{{_, ct}, headers} -> {ct, headers}
end

Expand Down
4 changes: 2 additions & 2 deletions test/tesla/middleware/timeout_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ defmodule Tesla.Middleware.TimeoutTest do
[{last_module, _, _, file_info} | _] = __STACKTRACE__

assert Tesla.Middleware.TimeoutTest.Client == last_module
assert file_info[:file] == 'lib/tesla/builder.ex'
assert file_info[:file] == ~c"lib/tesla/builder.ex"
assert file_info[:line] == 23
else
_ ->
Expand All @@ -131,7 +131,7 @@ defmodule Tesla.Middleware.TimeoutTest do
[_, {timeout_module, _, _, module_file_info} | _] = __STACKTRACE__

assert Tesla.Middleware.Timeout == timeout_module
assert module_file_info == [file: 'lib/tesla/middleware/timeout.ex', line: 59]
assert module_file_info == [file: ~c"lib/tesla/middleware/timeout.ex", line: 59]
else
_ ->
flunk("Expected exception to be thrown")
Expand Down

0 comments on commit af99950

Please sign in to comment.