Skip to content

Commit

Permalink
Update Elixir/Erlang versions in CI (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide authored Dec 22, 2024
1 parent b2c0d64 commit 003a7ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
PLUG_CRYPTO_2_0: "false"

# Latest-supported Elixir/Erlang pair.
- elixir: "1.17"
otp: "27.0"
- elixir: "1.18"
otp: "27.2"
lint: lint
PLUG_CRYPTO_2_0: "true"

Expand Down
15 changes: 10 additions & 5 deletions test/plug/debugger_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ defmodule Plug.DebuggerTest do

get "/bad_match" do
_ = conn
bad_match(:six, :one)
# Code.eval_quoted/2 to avoid typing violations at compile time.
Code.eval_quoted(quote do: unquote(__MODULE__).bad_match(:six, :one))
end

get "/send_and_wrapped" do
Expand All @@ -77,14 +78,18 @@ defmodule Plug.DebuggerTest do
raise ActionableError
end

defp returns_nil, do: nil
# Code.eval_quoted/2 to avoid typing violations at compile time.
defp returns_nil do
{result, _bindings} = Code.eval_quoted(quote do: nil)
result
end

defp add_csp(conn, _opts),
do: Plug.Conn.put_resp_header(conn, "content-security-policy", "abcdef")

defp bad_match(:one, :two), do: :ok
defp bad_match(:three, :four), do: :ok
defp bad_match(:five, :six), do: :ok
def bad_match(:one, :two), do: :ok
def bad_match(:three, :four), do: :ok
def bad_match(:five, :six), do: :ok
end

defmodule StyledRouter do
Expand Down

0 comments on commit 003a7ad

Please sign in to comment.