From aadab039d5f22b9fe85c82e141780713b7f8110f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 12 Oct 2018 17:59:05 +0100 Subject: [PATCH] Run for test suite in CircleCI --- .circleci/config.yml | 43 ++++++++++++++++++++++++++++++++++++++++--- .gitignore | 1 + bunnyrun.gemspec | 1 + 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49d5a39..bf20584 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,18 @@ version: 2 +workflows: + version: 2 + tests: + jobs: + - ruby-2.3-tests + - ruby-2.4-tests + - ruby-2.5-tests + audit: + jobs: + - audit jobs: - build: + ruby-2.3-tests: &test-template docker: - - image: circleci/ruby:2.5.1-node-browsers + - image: circleci/ruby:2.3-node-browsers steps: - checkout - run: @@ -12,5 +22,32 @@ jobs: name: Bundle Install command: bundle check || bundle install - run: - name: Run rspec in parallel + name: Run rspec + command: | + bundle exec rspec --format RspecJunitFormatter \ + --out test_results/rspec.xml \ + --format progress + - store_test_results: + path: test_results + - run: + name: Run rubocop + command: bundle exec rubocop + ruby-2.4-tests: + <<: *test-template + docker: + - image: circleci/ruby:2.4-node-browsers + ruby-2.5-tests: + <<: *test-template + docker: + - image: circleci/ruby:2.5-node-browsers + audit: + docker: + - image: circleci/ruby:2.5-node-browsers + steps: + - checkout + - run: + name: Bundle Install + command: bundle check || bundle install + - run: + name: Run bundle audit command: bundle audit check --update diff --git a/.gitignore b/.gitignore index 8eb3b06..afc1a58 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /doc/ /pkg/ /spec/reports/ +/test_results/ /tmp/ # rspec failure tracking diff --git a/bunnyrun.gemspec b/bunnyrun.gemspec index ff81038..e16eb7d 100644 --- a/bunnyrun.gemspec +++ b/bunnyrun.gemspec @@ -29,6 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'guard-rubocop' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' + spec.add_development_dependency 'rspec_junit_formatter' spec.add_development_dependency 'rubocop', '~> 0.51' spec.add_development_dependency 'rubocop-rspec', '~> 1.24'