Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #121

Merged
merged 4 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -12,10 +12,11 @@ jobs:
strategy:
fail-fast: false
matrix:
rebar3:
- '3.20.0'
otp:
- '24.1'
- '23.3.4.7'
- '22.3.4.21'
- '26'
- '25'
kafka:
- '2.4'
- '1.1'
@@ -30,24 +31,24 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/rebar3/hex/hexpm/packages
key: ${{ runner.os }}-hex-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }}
key: ${{ runner.os }}-hex2-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }}
restore-keys: |
${{ runner.os }}-hex-
${{ runner.os }}-hex2-
- name: Cache Dialyzer PLTs
uses: actions/cache@v2
with:
path: ~/.cache/rebar3/rebar3_*_plt
key: ${{ runner.os }}-dialyzer-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }}
key: ${{ runner.os }}--dialyzer2-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }}
restore-keys: |
${{ runner.os }}-dialyzer-
${{ runner.os }}-dialyzer2-
# Install Erlang
- name: Install Erlang/OTP
uses: erlef/setup-beam@v1
with:
version-type: strict
otp-version: ${{matrix.otp}}
rebar3-version: '3.17.0'
rebar3-version: ${{matrix.rebar3}}

# Compile
- name: Compile
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KAFKA_VERSION ?= 2.4
export KAFKA_VERSION ?= 2.4
all: compile

rebar ?= $(shell which rebar3)
28 changes: 3 additions & 25 deletions scripts/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
version: '2'

services:
pause:
image: "gcr.io/google_containers/pause-amd64:3.0"
networks:
- pausenet
ports:
- "2181:2181"
- "9092:9092"
- "9093:9093"
- "9094:9094"
- "9095:9095"
- "9192:9192"
- "9193:9193"
- "9194:9194"
- "9195:9195"
container_name: pause
zookeeper:
depends_on:
- pause
image: "zmstone/kafka:${KAFKA_VERSION}"
container_name: zookeeper
command: run zookeeper
network_mode: service:pause
network_mode: host
kafka_1:
depends_on:
- pause
- zookeeper
image: "zmstone/kafka:${KAFKA_VERSION}"
container_name: 'kafka-1'
network_mode: service:pause
network_mode: host
environment:
BROKER_ID: 0
PLAINTEXT_PORT: 9092
@@ -40,11 +22,10 @@ services:
ZOOKEEPER_CONNECT: "localhost:2181"
kafka_2:
depends_on:
- pause
- zookeeper
image: "zmstone/kafka:${KAFKA_VERSION}"
container_name: 'kafka-2'
network_mode: service:pause
network_mode: host
environment:
BROKER_ID: 1
PLAINTEXT_PORT: 9192
@@ -53,6 +34,3 @@ services:
SASL_PLAINTEXT_PORT: 9195
ADVERTISED_HOSTNAME: localhost
ZOOKEEPER_CONNECT: "localhost:2181"

networks:
pausenet:
2 changes: 1 addition & 1 deletion scripts/setup-test-env.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ docker ps > /dev/null || {
exit 1
}

VERSION=${KAFKA_VERSION:-1.1}
VERSION=${KAFKA_VERSION:-2.4}
if [ -z $VERSION ]; then VERSION=$1; fi

case $VERSION in
2 changes: 2 additions & 0 deletions src/kpro_brokers.erl
Original file line number Diff line number Diff line change
@@ -26,7 +26,9 @@
]).

-include("kpro_private.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

-type endpoint() :: kpro:endpoint().
-type topic() :: kpro:topic().
2 changes: 2 additions & 0 deletions src/kpro_connection.erl
Original file line number Diff line number Diff line change
@@ -42,7 +42,9 @@
]).

-include("kpro_private.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

-define(DEFAULT_CONNECT_TIMEOUT, timer:seconds(5)).
-define(DEFAULT_REQUEST_TIMEOUT, timer:minutes(4)).
1 change: 1 addition & 0 deletions test/kpro_test_lib.erl
Original file line number Diff line number Diff line change
@@ -257,6 +257,7 @@ default_ssl_options() ->
, {keyfile, Fname("client.key")}
, {certfile, Fname("client.crt")}
, {verify, verify_none}
, {versions, ['tlsv1.2']}
].

osenv(Name) ->