-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from tknzk/circleci_2_0
migrate circleci 2.0
- Loading branch information
Showing
4 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
parallelism: 3 | ||
docker: | ||
- image: circleci/ruby:2.4.2-jessie-node | ||
environment: | ||
BUNDLE_JOBS: 3 | ||
BUNDLE_RETRY: 3 | ||
BUNDLE_PATH: vendor/bundle | ||
RAILS_ENV: test | ||
steps: | ||
- checkout | ||
|
||
# Which version of bundler? | ||
- run: | ||
name: Which bundler? | ||
command: bundle -v | ||
|
||
# Restore bundle cache | ||
- restore_cache: | ||
keys: | ||
- kirico-bundle-v2-{{ checksum "Gemfile.lock" }} | ||
- kirico-bundle-v2- | ||
|
||
- run: | ||
name: Bundle Install | ||
command: bundle check || bundle install | ||
|
||
# Store bundle cache | ||
- save_cache: | ||
key: kirico-bundle-v2-{{ checksum "Gemfile.lock" }} | ||
paths: | ||
- vendor/bundle | ||
|
||
- run: | ||
name: Run Rubocop | ||
command: ./script/circleci/run_rubocop.sh | ||
|
||
- run: | ||
name: Run rspec in parallel | ||
command: ./script/circleci/run_rspec.sh | ||
|
||
# Save test results for timing analysis | ||
- store_test_results: | ||
path: test_results |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
test_reports_dir=$CIRCLE_TEST_REPORTS/rspec | ||
mkdir -p $test_reports_dir | ||
|
||
circleci tests glob "spec/**/*_spec.rb" | \ | ||
circleci tests split --split-by=timings --timings-type=filename | \ | ||
xargs bundle exec rspec --color --format RspecJunitFormatter --out $test_reports_dir/hanica.xml --format progress --require spec_helper --tag ~type:profiling --profile -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -e | ||
test_reports_dir=$CIRCLE_TEST_REPORTS/rubocop | ||
mkdir -p $test_reports_dir | ||
junit_formatter_ruby=$(bundle show rubocop-junit-formatter 2>/dev/null)/lib/rubocop/formatter/junit_formatter.rb | ||
|
||
bundle exec rubocop -L | \ | ||
circleci tests split --split-by=timings --timings-type=filename | \ | ||
xargs bundle exec rubocop -D -R -r $junit_formatter_ruby -c .rubocop.yml --format RuboCop::Formatter::JUnitFormatter --out $test_reports_dir/rubocop.xml |