Skip to content

Commit

Permalink
Update to circleci 2.1 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejfuhrer authored Dec 4, 2019
1 parent 0e23142 commit e7d5ecc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 43 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

version: 2.1
jobs:
build:
parallelism: 4
docker: # run the steps with Docker
- image: circleci/ruby:2.3
environment: # environment variables for primary container
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
RAILS_ENV: test
steps: # a collection of executable commands
- checkout # special step to check out source code to working directory

# Which version of bundler?
- run:
name: Which bundler?
command: bundle -v

# Restore bundle cache
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
- restore_cache:
keys:
- rocket-library-{{ checksum "Gemfile.lock" }}
- rocket-library-

- run: # Install Ruby dependencies
name: Bundle Install
command: bundle check --path vendor/bundle || bundle install --deployment

# Store bundle cache for Ruby dependencies
- save_cache:
key: rrocket-library-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

- run:
name: Run rspec in parallel
command: |
bundle exec rspec --profile 10 \
--format JUnit \
--out $CIRCLE_TEST_REPORTS/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
# Save test results for timing analysis
- store_test_results: # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
path: $CIRCLE_TEST_REPORTS
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
.byebug_history

# File uploads
public/uploads/*
public/uploads/*

# Ignore vendor
vendor/*
14 changes: 0 additions & 14 deletions circle.yml

This file was deleted.

28 changes: 0 additions & 28 deletions shippable.yml

This file was deleted.

0 comments on commit e7d5ecc

Please sign in to comment.