diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a68913b..a0684c46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,53 +1,33 @@ name: ci - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - on: pull_request: push: schedule: - cron: '0 1 * * *' - env: BUNDLE_RETRY: 6 BUNDLE_JOBS: 4 - jobs: - specs: + macos-specs: timeout-minutes: 30 - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby: - - '3.4.0-preview2' - - '3.3' - - '3.2' - - '3.1' - include: - - ruby: '3.3' - coverage: 'true' + runs-on: macos-13 steps: + - uses: docker/setup-docker-action@v4 - uses: actions/checkout@v4 - - name: Install package dependencies - run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS" - + - name: Install docker-compose + run: brew install docker-compose - name: Start Kafka with docker compose run: | docker compose up -d || (sleep 5 && docker compose up -d) - - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{matrix.ruby}} + ruby-version: '3.3' # Using latest stable Ruby version bundler-cache: true - - name: Run all specs - env: - GITHUB_COVERAGE: ${{matrix.coverage}} - run: | set -e bundle install --path vendor/bundle diff --git a/docker-compose.yml b/docker-compose.yml index 3c368298..130f7032 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_PROCESS_ROLES: broker,controller KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER - KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 + KAFKA_LISTENERS: PLAINTEXT:0.0.0.0//:9092,CONTROLLER:0.0.0.0//:9093 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092 KAFKA_BROKER_ID: 1 diff --git a/spec/rdkafka/producer_spec.rb b/spec/rdkafka/producer_spec.rb index d86f6895..871200ba 100644 --- a/spec/rdkafka/producer_spec.rb +++ b/spec/rdkafka/producer_spec.rb @@ -53,7 +53,7 @@ let(:producer) do rdkafka_producer_config( 'message.timeout.ms': 1_000_000, - :"bootstrap.servers" => "localhost:9094", + :"bootstrap.servers" => "0.0.0.0:9094", ).producer end @@ -623,7 +623,7 @@ def call(_, handle) context "when not being able to deliver the message" do let(:producer) do rdkafka_producer_config( - "bootstrap.servers": "localhost:9093", + "bootstrap.servers": "0.0.0.0:9093", "message.timeout.ms": 100 ).producer end @@ -694,7 +694,7 @@ def call(_, handle) context 'when it cannot flush due to a timeout' do let(:producer) do rdkafka_producer_config( - "bootstrap.servers": "localhost:9093", + "bootstrap.servers": "0.0.0.0:9093", "message.timeout.ms": 2_000 ).producer end @@ -741,7 +741,7 @@ def call(_, handle) context 'when there are outgoing things in the queue' do let(:producer) do rdkafka_producer_config( - "bootstrap.servers": "localhost:9093", + "bootstrap.servers": "0.0.0.0:9093", "message.timeout.ms": 2_000 ).producer end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0f2a02f3..b1161b99 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,7 @@ def rdkafka_base_config { :"api.version.request" => false, :"broker.version.fallback" => "1.0", - :"bootstrap.servers" => "localhost:9092", + :"bootstrap.servers" => "0.0.0.0:9092", } end
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: