feat: Update Consumer#poll to raise an exception when message is an e… #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: [1.11.2, 1.12.2, 1.13.3, 1.14.0] | |
runs-on: ubuntu-latest | |
services: | |
kafka: | |
image: bitnami/kafka:latest | |
ports: | |
- 9092:9092 | |
- 9094:9094 | |
env: | |
KAFKA_CFG_NODE_ID: 0 | |
KAFKA_CFG_PROCESS_ROLES: controller,broker | |
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093 | |
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094 | |
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094 | |
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT | |
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER | |
steps: | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ matrix.crystal }} | |
- name: Install librdkafka | |
run: sudo -n apt-get install -qy librdkafka-dev | |
- name: Download source | |
uses: actions/checkout@v4 | |
- name: Check formatting | |
run: crystal tool format --check | |
- name: Run unit tests | |
run: crystal spec -v --color spec/kafka spec/rdkafka | |
- name: Run integration tests | |
run: | | |
for test in spec/integration/*_spec.cr; do | |
crystal spec -v --color ${test}; | |
done | |
timeout-minutes: 2 |