Skip to content

Commit 04c676e

Browse files
authored
Merge pull request #115 from mxenabled/move_to_circleci
Move to circleci
2 parents ebf265f + d6d3930 commit 04c676e

2 files changed

Lines changed: 62 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Inspired by: http://mikebian.co/running-tests-against-multiple-ruby-versions-using-circleci/
2+
3+
version: 2.1
4+
5+
orbs:
6+
ruby: circleci/ruby@1.1
7+
8+
9+
# If you want to work on `action_subscriber` you will need to have a rabbitmq instance running locally on port 5672 with a management plugin enabled on port 15672. Usually the easiest way to accomplish this is to use docker and run the command:
10+
11+
# ```
12+
13+
jobs:
14+
test:
15+
parallelism: 1
16+
parameters:
17+
ruby-image:
18+
type: string
19+
docker:
20+
- image: << parameters.ruby-image >>
21+
- image: rabbitmq:3.6.6-management
22+
23+
steps:
24+
- checkout
25+
- run:
26+
name: install dockerize
27+
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
28+
environment:
29+
DOCKERIZE_VERSION: v0.3.0
30+
# - run:
31+
# name: Wait for rabbitmq
32+
# command: dockerize -wait tcp://localhost:5672 -timeout 1m
33+
- run:
34+
name: Install bundler
35+
command: gem install bundler
36+
- run:
37+
name: Which bundler?
38+
command: bundle -v
39+
- run:
40+
name: bundle install
41+
command: bundle install
42+
- run:
43+
name: rspec
44+
command: bundle exec rspec
45+
46+
# strangely, there seems to be very little documentation about exactly how martix builds work.
47+
# By defining a param inside your job definition, Circle CI will automatically spawn a job for
48+
# unique param value passed via `matrix`. Neat!
49+
# https://circleci.com/blog/circleci-matrix-jobs/
50+
workflows:
51+
build_and_test:
52+
jobs:
53+
- test:
54+
matrix:
55+
parameters:
56+
ruby-image:
57+
- circleci/ruby:2.5
58+
- circleci/ruby:2.6
59+
- circleci/ruby:2.7
60+
- circleci/jruby:9.2
61+
- circleci/jruby:9.3

action_subscriber.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
2222

2323
if ENV['PLATFORM'] == "java" || ::RUBY_PLATFORM == 'java'
2424
spec.platform = "java"
25-
spec.add_dependency 'march_hare', '>= 2.7.0'
25+
spec.add_dependency 'march_hare', '~> 4.4'
2626
else
2727
spec.add_dependency 'bunny', '>= 1.5.0'
2828
end

0 commit comments

Comments
 (0)