Skip to content

Commit cf59d4f

Browse files
authored
Merge pull request #512 from zendesk/dasch/advanced-ci
Improve CI
2 parents 027f394 + f9bf2df commit cf59d4f

File tree

2 files changed

+79
-4
lines changed

2 files changed

+79
-4
lines changed

.circleci/config.yml

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
version: 2
22
jobs:
3-
build:
3+
unit:
4+
docker:
5+
- image: circleci/ruby:2.4.1-node
6+
environment:
7+
LOG_LEVEL: DEBUG
8+
steps:
9+
- checkout
10+
- run: bundle install --path vendor/bundle
11+
- run: bundle exec rspec
12+
- run: bundle exec rubocop
13+
14+
kafka-0.10:
415
docker:
516
- image: circleci/ruby:2.4.1-node
617
environment:
@@ -24,10 +35,74 @@ jobs:
2435
KAFKA_ADVERTISED_PORT: 9094
2536
KAFKA_PORT: 9094
2637
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
38+
steps:
39+
- checkout
40+
- run: bundle install --path vendor/bundle
41+
- run: bundle exec rspec --profile --tag functional spec/functional
42+
43+
kafka-0.11:
44+
docker:
45+
- image: circleci/ruby:2.4.1-node
46+
environment:
47+
LOG_LEVEL: DEBUG
48+
- image: wurstmeister/zookeeper
49+
- image: wurstmeister/kafka:0.11.0.1
50+
environment:
51+
KAFKA_ADVERTISED_HOST_NAME: localhost
52+
KAFKA_ADVERTISED_PORT: 9092
53+
KAFKA_PORT: 9092
54+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
55+
- image: wurstmeister/kafka:0.11.0.1
56+
environment:
57+
KAFKA_ADVERTISED_HOST_NAME: localhost
58+
KAFKA_ADVERTISED_PORT: 9093
59+
KAFKA_PORT: 9093
60+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
61+
- image: wurstmeister/kafka:0.11.0.1
62+
environment:
63+
KAFKA_ADVERTISED_HOST_NAME: localhost
64+
KAFKA_ADVERTISED_PORT: 9094
65+
KAFKA_PORT: 9094
66+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
67+
steps:
68+
- checkout
69+
- run: bundle install --path vendor/bundle
70+
- run: bundle exec rspec --profile --tag functional spec/functional
2771

72+
kafka-1.0:
73+
docker:
74+
- image: circleci/ruby:2.4.1-node
75+
environment:
76+
LOG_LEVEL: DEBUG
77+
- image: wurstmeister/zookeeper
78+
- image: wurstmeister/kafka:1.0.0
79+
environment:
80+
KAFKA_ADVERTISED_HOST_NAME: localhost
81+
KAFKA_ADVERTISED_PORT: 9092
82+
KAFKA_PORT: 9092
83+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
84+
- image: wurstmeister/kafka:1.0.0
85+
environment:
86+
KAFKA_ADVERTISED_HOST_NAME: localhost
87+
KAFKA_ADVERTISED_PORT: 9093
88+
KAFKA_PORT: 9093
89+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
90+
- image: wurstmeister/kafka:1.0.0
91+
environment:
92+
KAFKA_ADVERTISED_HOST_NAME: localhost
93+
KAFKA_ADVERTISED_PORT: 9094
94+
KAFKA_PORT: 9094
95+
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
2896
steps:
2997
- checkout
3098
- run: bundle install --path vendor/bundle
31-
- run: bundle exec rspec
3299
- run: bundle exec rspec --profile --tag functional spec/functional
33-
- run: bundle exec rubocop
100+
101+
workflows:
102+
version: 2
103+
test:
104+
jobs:
105+
- unit
106+
- kafka-0.10
107+
- kafka-0.11
108+
- kafka-1.0

spec/functional/api_versions_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
produce_api = kafka.apis.find {|v| v.api_key == 0 }
44

55
expect(produce_api.min_version).to eq 0
6-
expect(produce_api.max_version).to eq 2
6+
expect(produce_api.max_version).to be >= 2
77
end
88
end

0 commit comments

Comments
 (0)