Skip to content

Commit

Permalink
Fixing CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
akoutmos committed Aug 7, 2024
1 parent d17bd60 commit d8a6233
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 73 deletions.
3 changes: 2 additions & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Used by "mix format"
[
line_length: 120,
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
import_deps: [:plug, :phoenix_live_view, :phoenix]
]
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ env:

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
static_analysis:
Expand All @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-elixir@v1
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.4'
otp-version: '25.0'
elixir-version: "1.17.2"
otp-version: "27.0"
- name: Restore cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -52,16 +52,16 @@ jobs:
strategy:
matrix:
elixir:
- '1.13'
- "1.17"
otp:
- '24.0'
- '25.0'
- "26.0"
- "27.0"

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-elixir@v1
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
Expand Down
76 changes: 38 additions & 38 deletions test/support/events/phoenix_live_view.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
view: WebAppWeb.PageLive
},
stacktrace: [
{WebAppWeb.PageLive, :handle_event, 3, [file: c"lib/web_app_web/live/page_live.ex", line: 24]},
{WebAppWeb.PageLive, :handle_event, 3, [file: ~c"lib/web_app_web/live/page_live.ex", line: 24]},
{Phoenix.LiveView.Channel, :"-view_handle_event/3-fun-0-", 3,
[file: c"lib/phoenix_live_view/channel.ex", line: 349]},
[file: ~c"lib/phoenix_live_view/channel.ex", line: 349]},
{:telemetry, :span, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
line: 293
]},
{Phoenix.LiveView.Channel, :handle_info, 2, [file: c"lib/phoenix_live_view/channel.ex", line: 206]},
{:gen_server, :try_dispatch, 4, [file: c"gen_server.erl", line: 695]},
{:gen_server, :handle_msg, 6, [file: c"gen_server.erl", line: 771]},
{:proc_lib, :init_p_do_apply, 3, [file: c"proc_lib.erl", line: 226]}
{Phoenix.LiveView.Channel, :handle_info, 2, [file: ~c"lib/phoenix_live_view/channel.ex", line: 206]},
{:gen_server, :try_dispatch, 4, [file: ~c"gen_server.erl", line: 695]},
{:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 771]},
{:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 226]}
],
telemetry_span_context: :erlang.make_ref()
}
Expand Down Expand Up @@ -111,39 +111,39 @@
view: WebAppWeb.PageLive
},
stacktrace: [
{WebAppWeb.PageLive, :mount, 3, [file: c"lib/web_app_web/live/page_live.ex", line: 14]},
{WebAppWeb.PageLive, :mount, 3, [file: ~c"lib/web_app_web/live/page_live.ex", line: 14]},
{Phoenix.LiveView.Utils, :"-maybe_call_live_view_mount!/4-fun-0-", 5,
[file: c"lib/phoenix_live_view/utils.ex", line: 301]},
[file: ~c"lib/phoenix_live_view/utils.ex", line: 301]},
{:telemetry, :span, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
line: 293
]},
{Phoenix.LiveView.Static, :call_mount_and_handle_params!, 5,
[file: c"lib/phoenix_live_view/static.ex", line: 260]},
{Phoenix.LiveView.Static, :render, 3, [file: c"lib/phoenix_live_view/static.ex", line: 110]},
{Phoenix.LiveView.Controller, :live_render, 3, [file: c"lib/phoenix_live_view/controller.ex", line: 35]},
{Phoenix.Router, :__call__, 2, [file: c"lib/phoenix/router.ex", line: 355]},
{WebAppWeb.Endpoint, :plug_builder_call, 2, [file: c"lib/web_app_web/endpoint.ex", line: 1]},
{WebAppWeb.Endpoint, :"call (overridable 3)", 2, [file: c"lib/plug/debugger.ex", line: 136]},
{WebAppWeb.Endpoint, :call, 2, [file: c"lib/web_app_web/endpoint.ex", line: 1]},
{Phoenix.Endpoint.Cowboy2Handler, :init, 4, [file: c"lib/phoenix/endpoint/cowboy2_handler.ex", line: 54]},
[file: ~c"lib/phoenix_live_view/static.ex", line: 260]},
{Phoenix.LiveView.Static, :render, 3, [file: ~c"lib/phoenix_live_view/static.ex", line: 110]},
{Phoenix.LiveView.Controller, :live_render, 3, [file: ~c"lib/phoenix_live_view/controller.ex", line: 35]},
{Phoenix.Router, :__call__, 2, [file: ~c"lib/phoenix/router.ex", line: 355]},
{WebAppWeb.Endpoint, :plug_builder_call, 2, [file: ~c"lib/web_app_web/endpoint.ex", line: 1]},
{WebAppWeb.Endpoint, :"call (overridable 3)", 2, [file: ~c"lib/plug/debugger.ex", line: 136]},
{WebAppWeb.Endpoint, :call, 2, [file: ~c"lib/web_app_web/endpoint.ex", line: 1]},
{Phoenix.Endpoint.Cowboy2Handler, :init, 4, [file: ~c"lib/phoenix/endpoint/cowboy2_handler.ex", line: 54]},
{:cowboy_handler, :execute, 2,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_handler.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_handler.erl",
line: 37
]},
{:cowboy_stream_h, :execute, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
line: 306
]},
{:cowboy_stream_h, :request_process, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
line: 295
]},
{:proc_lib, :init_p_do_apply, 3, [file: c"proc_lib.erl", line: 226]}
{:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 226]}
],
telemetry_span_context: :erlang.make_ref()
}
Expand Down Expand Up @@ -194,40 +194,40 @@
view: WebAppWeb.PageLive
},
stacktrace: [
{GenServer, :call, 3, [file: c"lib/gen_server.ex", line: 1014]},
{WebAppWeb.PageLive, :mount, 3, [file: c"lib/web_app_web/live/page_live.ex", line: 6]},
{GenServer, :call, 3, [file: ~c"lib/gen_server.ex", line: 1014]},
{WebAppWeb.PageLive, :mount, 3, [file: ~c"lib/web_app_web/live/page_live.ex", line: 6]},
{Phoenix.LiveView.Utils, :"-maybe_call_live_view_mount!/4-fun-0-", 5,
[file: c"lib/phoenix_live_view/utils.ex", line: 301]},
[file: ~c"lib/phoenix_live_view/utils.ex", line: 301]},
{:telemetry, :span, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/telemetry/src/telemetry.erl",
line: 293
]},
{Phoenix.LiveView.Static, :call_mount_and_handle_params!, 5,
[file: c"lib/phoenix_live_view/static.ex", line: 260]},
{Phoenix.LiveView.Static, :render, 3, [file: c"lib/phoenix_live_view/static.ex", line: 110]},
{Phoenix.LiveView.Controller, :live_render, 3, [file: c"lib/phoenix_live_view/controller.ex", line: 35]},
{Phoenix.Router, :__call__, 2, [file: c"lib/phoenix/router.ex", line: 355]},
{WebAppWeb.Endpoint, :plug_builder_call, 2, [file: c"lib/web_app_web/endpoint.ex", line: 1]},
{WebAppWeb.Endpoint, :"call (overridable 3)", 2, [file: c"lib/plug/debugger.ex", line: 136]},
{WebAppWeb.Endpoint, :call, 2, [file: c"lib/web_app_web/endpoint.ex", line: 1]},
{Phoenix.Endpoint.Cowboy2Handler, :init, 4, [file: c"lib/phoenix/endpoint/cowboy2_handler.ex", line: 54]},
[file: ~c"lib/phoenix_live_view/static.ex", line: 260]},
{Phoenix.LiveView.Static, :render, 3, [file: ~c"lib/phoenix_live_view/static.ex", line: 110]},
{Phoenix.LiveView.Controller, :live_render, 3, [file: ~c"lib/phoenix_live_view/controller.ex", line: 35]},
{Phoenix.Router, :__call__, 2, [file: ~c"lib/phoenix/router.ex", line: 355]},
{WebAppWeb.Endpoint, :plug_builder_call, 2, [file: ~c"lib/web_app_web/endpoint.ex", line: 1]},
{WebAppWeb.Endpoint, :"call (overridable 3)", 2, [file: ~c"lib/plug/debugger.ex", line: 136]},
{WebAppWeb.Endpoint, :call, 2, [file: ~c"lib/web_app_web/endpoint.ex", line: 1]},
{Phoenix.Endpoint.Cowboy2Handler, :init, 4, [file: ~c"lib/phoenix/endpoint/cowboy2_handler.ex", line: 54]},
{:cowboy_handler, :execute, 2,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_handler.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_handler.erl",
line: 37
]},
{:cowboy_stream_h, :execute, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
line: 306
]},
{:cowboy_stream_h, :request_process, 3,
[
file: c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
file: ~c"/home/apps/prom_ex/example_applications/web_app/deps/cowboy/src/cowboy_stream_h.erl",
line: 295
]},
{:proc_lib, :init_p_do_apply, 3, [file: c"proc_lib.erl", line: 226]}
{:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 226]}
],
telemetry_span_context: :erlang.make_ref()
}
Expand Down
46 changes: 23 additions & 23 deletions test/support/test_app_router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ defmodule TestApp.Router do
import Phoenix.LiveView.Router

scope "/", TestApp do
live("/", PageLive, :index)
get("/users", UserController, :index)
get("/users/:id", UserController, :show)
post("/users/:id/action/level-up", UserController, :level_up)
post("/users", UserController, :create)
delete("/users/:id", UserController, :delete)
live "/", PageLive, :index
get "/users", UserController, :index
get "/users/:id", UserController, :show
post "/users/:id/action/level-up", UserController, :level_up
post "/users", UserController, :create
delete "/users/:id", UserController, :delete
end
end

Expand All @@ -27,12 +27,12 @@ defmodule TestApp.ExternalRouter do
import Phoenix.LiveView.Router

scope "/external", TestApp do
live("/", PageLive, :index)
get("/users", UserController, :index)
get("/users/:id", UserController, :show)
post("/users/:id/action/level-up", UserController, :level_up)
post("/users", UserController, :create)
delete("/users/:id", UserController, :delete)
live "/", PageLive, :index
get "/users", UserController, :index
get "/users/:id", UserController, :show
post "/users/:id/action/level-up", UserController, :level_up
post "/users", UserController, :create
delete "/users/:id", UserController, :delete
end
end

Expand All @@ -42,23 +42,23 @@ defmodule TestApp.InternalRouter do
import Phoenix.LiveView.Router

scope "/internal", TestApp do
live("/", PageLive, :index)
get("/users", UserController, :index)
get("/users/:id", UserController, :show)
post("/users/:id/action/level-up", UserController, :level_up)
post("/users", UserController, :create)
delete("/users/:id", UserController, :delete)
live "/", PageLive, :index
get "/users", UserController, :index
get "/users/:id", UserController, :show
post "/users/:id/action/level-up", UserController, :level_up
post "/users", UserController, :create
delete "/users/:id", UserController, :delete
end
end

defmodule TestApp.PlugRouter do
use Plug.Router

plug(PromEx.Plug, prom_ex_module: TestApp.PromEx, path: "/metrics")
plug(Plug.Telemetry, event_prefix: [:testapp, :plug, :router])
plug(Plug.Parsers, parsers: [:json], json_decoder: Jason)
plug(:match)
plug(:dispatch, builder_opts())
plug PromEx.Plug, prom_ex_module: TestApp.PromEx, path: "/metrics"
plug Plug.Telemetry, event_prefix: [:testapp, :plug, :router]
plug Plug.Parsers, parsers: [:json], json_decoder: Jason
plug :match
plug :dispatch

get "/users/:id" do
conn
Expand Down

0 comments on commit d8a6233

Please sign in to comment.