Skip to content

Commit 9f33dfe

Browse files
fix CI dependency issues and Phoenix.PubSub configuration
1 parent 0416ae5 commit 9f33dfe

4 files changed

Lines changed: 27 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,22 @@ jobs:
3838
elixir-version: ${{ env.ELIXIR_VERSION }}
3939
otp-version: ${{ env.OTP_VERSION }}
4040

41-
- name: Restore dependencies cache
42-
uses: actions/cache@v4
43-
with:
44-
path: |
45-
deps
46-
_build
47-
key: ${{ runner.os }}-mix-otp28-${{ hashFiles('**/mix.lock') }}
48-
restore-keys: ${{ runner.os }}-mix-otp28-
49-
41+
# Temporarily disabled cache to ensure clean builds
42+
# - name: Restore dependencies cache
43+
# uses: actions/cache@v4
44+
# with:
45+
# path: |
46+
# deps
47+
# _build
48+
# key: ${{ runner.os }}-mix-otp28-${{ hashFiles('**/mix.lock') }}
49+
# restore-keys: ${{ runner.os }}-mix-otp28-
50+
5051
- name: Install dependencies
5152
run: |
5253
mix local.hex --force
5354
mix local.rebar --force
5455
mix deps.get
56+
mix deps.compile
5557
5658
- name: Check formatting
5759
run: mix format --check-formatted

apps/kafkaesque_core/lib/kafkaesque/core/application.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule Kafkaesque.Core.Application do
88
children = [
99
{Registry, keys: :unique, name: Kafkaesque.TopicRegistry},
1010
{DynamicSupervisor, name: Kafkaesque.TopicSupervisor, strategy: :one_for_one},
11-
{Phoenix.PubSub, name: Kafkaesque.PubSub},
11+
{Phoenix.PubSub, name: Kafkaesque.PubSub, adapter: Phoenix.PubSub.PG2},
1212
Kafkaesque.Telemetry.Supervisor
1313
]
1414

apps/kafkaesque_core/test/pipeline/produce_broadway_test.exs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,21 @@ defmodule Kafkaesque.Pipeline.ProduceBroadwayTest do
4545
max_queue_size: 100
4646
)
4747

48-
assert {:ok, pid} =
49-
ProduceBroadway.start_link(
50-
topic: @test_topic,
51-
partition: @test_partition,
52-
batch_size: 10,
53-
batch_timeout: 1
54-
)
48+
result =
49+
ProduceBroadway.start_link(
50+
topic: @test_topic,
51+
partition: @test_partition,
52+
batch_size: 10,
53+
batch_timeout: 1
54+
)
5555

56-
assert Process.alive?(pid)
56+
case result do
57+
{:ok, pid} ->
58+
assert Process.alive?(pid)
59+
60+
{:error, {:already_started, pid}} ->
61+
assert Process.alive?(pid)
62+
end
5763
end
5864
end
5965

apps/kafkaesque_core/test/support/test_case.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ defmodule Kafkaesque.TestCase do
4848
nil ->
4949
# Not running, start it
5050
children = [
51-
{Phoenix.PubSub, name: Kafkaesque.PubSub}
51+
{Phoenix.PubSub, name: Kafkaesque.PubSub, adapter: Phoenix.PubSub.PG2}
5252
]
5353

5454
case Supervisor.start_link(children, strategy: :one_for_one, name: KafkaesqueTestPubSub) do

0 commit comments

Comments
 (0)