.circleci/config.yml in ddtrace-0.39.0 vs .circleci/config.yml in ddtrace-0.40.0
- old
+ new
@@ -160,26 +160,37 @@
- <<: *container_base
image: <<parameters.image>>
environment:
- BUNDLE_GEMFILE: /app/Gemfile
- TEST_DATADOG_INTEGRATION: 1
+ - COVERAGE_BASE_DIR: coverage
- *container_postgres
- *container_presto
- *container_mysql
- *container_elasticsearch
- *container_redis
- *container_mongo
- *container_memcached
- *container_agent
+ parallelism: 22
steps:
- restore_cache:
keys:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
+ - run:
+ name: Set coverage report directory
+ command: |
+ # Create a unique coverage directory for this job, to avoid conflicts when merging all results
+ echo 'export COVERAGE_DIR="$COVERAGE_BASE_DIR/versions/$CIRCLE_JOB/$CIRCLE_NODE_INDEX"' >> $BASH_ENV
- *step_run_all_tests
+ - persist_to_workspace:
+ root: .
+ paths:
+ - coverage
benchmark:
<<: *job_defaults
parameters:
ruby_version:
description: Ruby version
@@ -229,10 +240,42 @@
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
- restore_cache:
keys:
- '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
- *step_rubocop
+ coverage:
+ <<: *job_defaults
+ parameters:
+ ruby_version:
+ description: Ruby version
+ type: string
+ image:
+ description: Docker image location
+ type: string
+ docker:
+ - <<: *container_base
+ image: <<parameters.image>>
+ environment:
+ - BUNDLE_GEMFILE: /app/Gemfile
+ steps:
+ - restore_cache:
+ keys:
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
+ - restore_cache:
+ keys:
+ - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
+ - attach_workspace:
+ at: /tmp/workspace
+ - run:
+ name: Generate coverage report artifact "coverage/index.html"
+ command: COVERAGE_DIR=/tmp/workspace/coverage bundle exec rake coverage:report
+ - run:
+ name: Generate coverage report artifact "coverage/versions/*/index.html"
+ command: COVERAGE_DIR=/tmp/workspace/coverage bundle exec rake coverage:report_per_ruby_version
+ - store_artifacts:
+ path: /tmp/workspace/coverage/report/
+ destination: coverage
commands:
executors:
jobs:
"deploy release":
@@ -337,9 +380,22 @@
- orb/lint:
<<: *config-2_6
name: lint
requires:
- build-2.6
+ - orb/coverage:
+ <<: *config-2_7
+ name: coverage
+ requires:
+ - test-2.0
+ - test-2.1
+ - test-2.2
+ - test-2.3
+ - test-2.4
+ - test-2.5
+ - test-2.6
+ - test-2.7
+ - test-jruby-9.2
# MRI
- orb/checkout:
<<: *config-2_0
name: checkout-2.0
- orb/build: