1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/.circleci/config.yml

83 lines
1.9 KiB
YAML
Raw Normal View History

2019-04-18 12:37:05 -04:00
version: 2
references:
unit: &unit
run:
name: Run test suite
command: bundle exec rake
restore: &restore
2019-04-18 12:40:24 -04:00
restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
2019-04-18 12:37:05 -04:00
bundle: &bundle
2019-04-18 12:40:24 -04:00
run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
2019-04-18 12:37:05 -04:00
save: &save
2019-04-18 12:40:24 -04:00
save_cache:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
2019-04-18 12:37:05 -04:00
jobs:
"ruby-2.5":
docker:
- image: circleci/ruby:2.5
- image: circleci/redis:4.0
steps:
- checkout
2019-04-18 12:43:29 -04:00
- <<: *restore
- <<: *bundle
- <<: *save
2019-04-18 12:37:05 -04:00
- <<: *unit
"ruby-2.6":
2019-09-29 16:20:30 -04:00
environment:
COVERAGE: true
2019-09-29 16:40:18 -04:00
CC_TEST_REPORTER_ID: 003c3033501d70a2653bd887ff9a8b2884a263e6a4e27f2ba68748e15530918d
2019-04-18 12:37:05 -04:00
docker:
- image: circleci/ruby:2.6
- image: circleci/redis:4.0
steps:
- checkout
2019-04-18 12:43:29 -04:00
- <<: *restore
- <<: *bundle
- <<: *save
2019-09-29 16:20:30 -04:00
- run:
2019-09-29 16:53:57 -04:00
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
2019-09-29 16:20:30 -04:00
- run:
2019-09-29 16:53:57 -04:00
name: Code Climate before-build
command: |
./cc-test-reporter before-build
2019-09-29 16:20:30 -04:00
2019-04-18 12:37:05 -04:00
- <<: *unit
2019-09-29 16:20:30 -04:00
- run:
2019-09-29 16:53:57 -04:00
name: Report code coverage to Code Climate
command: |
./cc-test-reporter after-build -t simplecov --exit-code $?
2019-04-18 12:37:05 -04:00
"jruby":
docker:
- image: circleci/jruby:latest
- image: circleci/redis:4.0
steps:
- checkout
2019-04-18 12:43:29 -04:00
- <<: *restore
- <<: *bundle
- <<: *save
2019-04-18 12:37:05 -04:00
- <<: *unit
workflows:
version: 2
build:
jobs:
- "ruby-2.5"
- "ruby-2.6"
- "jruby"