[APPSEC-56683] Update auto_user_instrumentation.mode
precedence behavior
#504
Workflow file for this run
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
# Please do NOT manually edit this file. | |
# This file is generated by 'bundle exec rake template:github:test' | |
--- | |
name: Unit Tests | |
'on': | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: 0 */4 * * 1-5 | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: "${{ github.ref != 'refs/heads/master' }}" | |
jobs: | |
batch-ruby-34: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-3.4) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:3.4 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-34-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-34-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-34: | |
needs: | |
- batch-ruby-34 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-3.4) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-34.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.4 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-34-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-34.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-34/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-34-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-34-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-33: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-3.3) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:3.3 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-33-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-33-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-33: | |
needs: | |
- batch-ruby-33 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-3.3) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-33.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.3 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-33-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-33.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-33/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-33-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-33-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-32: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-3.2) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:3.2 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-32-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-32-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-32: | |
needs: | |
- batch-ruby-32 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-3.2) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-32.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.2 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-32-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-32.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-32/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-32-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-32-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-31: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-3.1) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:3.1 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-31-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-31-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-31: | |
needs: | |
- batch-ruby-31 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-3.1) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-31.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.1 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-31-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-31.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-31/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-31-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-31-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-30: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-3.0) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:3.0 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-30-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-30-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-30: | |
needs: | |
- batch-ruby-30 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-3.0) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-30.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.0 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-30-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-30.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-30/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-30-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-30-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-27: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-2.7) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:2.7 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-27-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-27-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-27: | |
needs: | |
- batch-ruby-27 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-2.7) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-27.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:2.7 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-27-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-27.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-27/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-27-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-27-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-26: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-2.6) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:2.6 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-26-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-26-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-26: | |
needs: | |
- batch-ruby-26 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-2.6) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-26.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:2.6 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-26-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-26.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-26/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-26-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-26-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-ruby-25: | |
runs-on: ubuntu-24.04 | |
name: batch (ruby-2.5) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/ruby:2.5 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-ruby-25-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-ruby-25-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-ruby-25: | |
needs: | |
- batch-ruby-25 | |
runs-on: ubuntu-24.04 | |
name: build & test (ruby-2.5) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-ruby-25.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:2.5 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-25-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-25.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/ruby-25/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-ruby-25-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-ruby-25-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-jruby-94: | |
runs-on: ubuntu-24.04 | |
name: batch (jruby-9.4) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/jruby:9.4 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-jruby-94-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-jruby-94-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-jruby-94: | |
needs: | |
- batch-jruby-94 | |
runs-on: ubuntu-24.04 | |
name: build & test (jruby-9.4) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-jruby-94.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/jruby:9.4 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-jruby-94-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-jruby-94.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/jruby-94/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-jruby-94-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-jruby-94-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-jruby-93: | |
runs-on: ubuntu-24.04 | |
name: batch (jruby-9.3) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/jruby:9.3 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-jruby-93-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-jruby-93-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-jruby-93: | |
needs: | |
- batch-jruby-93 | |
runs-on: ubuntu-24.04 | |
name: build & test (jruby-9.3) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-jruby-93.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/jruby:9.3 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-jruby-93-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-jruby-93.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/jruby-93/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-jruby-93-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-jruby-93-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
batch-jruby-92: | |
runs-on: ubuntu-24.04 | |
name: batch (jruby-9.2) | |
outputs: | |
batches: "${{ steps.set-batches.outputs.batches }}" | |
cache-key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
container: ghcr.io/datadog/images-rb/engines/jruby:9.2 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Generate lockfile | |
run: bundle lock | |
- name: Upload lockfile | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: lockfile-jruby-92-${{ github.run_id }} | |
path: "*.lock" | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: bundle-${{ runner.os }}-${{ runner.arch }}-jruby-92-${{ hashFiles('*.lock') }} | |
path: "/usr/local/bundle" | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
run: bundle install | |
- if: steps.restore-cache.outputs.cache-hit != 'true' | |
name: Save cache | |
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
with: | |
key: "${{ steps.restore-cache.outputs.cache-primary-key }}" | |
path: "/usr/local/bundle" | |
- id: set-batches | |
name: Distribute tasks into batches | |
run: | | |
batches_json=$(bundle exec rake github:generate_batches) | |
echo "$batches_json" | ruby -rjson -e 'puts JSON.pretty_generate(JSON.parse(STDIN.read))' | |
echo "batches=$batches_json" >> $GITHUB_OUTPUT | |
- name: Generate batch summary | |
run: bundle exec rake github:generate_batch_summary | |
env: | |
batches_json: "${{ steps.set-batches.outputs.batches }}" | |
build-test-jruby-92: | |
needs: | |
- batch-jruby-92 | |
runs-on: ubuntu-24.04 | |
name: build & test (jruby-9.2) [${{ matrix.batch }}] | |
timeout-minutes: 30 | |
env: | |
BATCHED_TASKS: "${{ toJSON(matrix.tasks) }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: "${{ fromJson(needs.batch-jruby-92.outputs.batches).include }}" | |
container: | |
image: ghcr.io/datadog/images-rb/engines/jruby:9.2 | |
env: | |
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 'false' | |
DD_REMOTE_CONFIGURATION_ENABLED: 'false' | |
TEST_POSTGRES_HOST: postgres | |
TEST_REDIS_HOST: redis | |
TEST_ELASTICSEARCH_HOST: elasticsearch | |
TEST_MEMCACHED_HOST: memcached | |
TEST_MONGODB_HOST: mongodb | |
TEST_MYSQL_HOST: mysql | |
TEST_OPENSEARCH_HOST: opensearch | |
TEST_OPENSEARCH_PORT: '9200' | |
TEST_PRESTO_HOST: presto | |
DD_AGENT_HOST: agent | |
DD_TRACE_AGENT_PORT: '9126' | |
DATADOG_GEM_CI: 'true' | |
TEST_DATADOG_INTEGRATION: '1' | |
JRUBY_OPTS: "--dev" | |
services: | |
postgres: | |
image: ghcr.io/datadog/images-rb/services/postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
redis: | |
image: ghcr.io/datadog/images-rb/services/redis:6.2 | |
elasticsearch: | |
image: ghcr.io/datadog/images-rb/services/elasticsearch:8.1.3 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: 'false' | |
ES_JAVA_OPTS: "-Xms750m -Xmx750m" | |
memcached: | |
image: ghcr.io/datadog/images-rb/services/memcached:1.5-alpine | |
mongodb: | |
image: ghcr.io/datadog/images-rb/services/mongo:3.6 | |
opensearch: | |
image: ghcr.io/datadog/images-rb/services/opensearchproject/opensearch:2.8.0 | |
env: | |
discovery.type: single-node | |
DISABLE_SECURITY_PLUGIN: 'true' | |
DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI: 'true' | |
cluster.routing.allocation.disk.watermark.low: 3gb | |
cluster.routing.allocation.disk.watermark.high: 2gb | |
cluster.routing.allocation.disk.watermark.flood_stage: 1gb | |
cluster.routing.allocation.disk.threshold_enabled: 'false' | |
presto: | |
image: ghcr.io/datadog/images-rb/services/starburstdata/presto:332-e.9 | |
mysql: | |
image: ghcr.io/datadog/images-rb/services/mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_PASSWORD: mysql | |
MYSQL_USER: mysql | |
agent: | |
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.18.0 | |
env: | |
LOG_LEVEL: DEBUG | |
TRACE_LANGUAGE: ruby | |
PORT: '9126' | |
DD_POOL_TRACE_CHECK_FAILURES: 'true' | |
DD_DISABLE_ERROR_RESPONSES: 'true' | |
ENABLED_CHECKS: trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Configure Git | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-jruby-92-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-jruby-92.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- run: bundle exec rake github:run_batch_build | |
- name: Configure RSpec | |
run: ln -s .rspec-local.example .rspec-local | |
- run: bundle exec rake github:run_batch_tests | |
env: | |
COVERAGE_DIR: coverage/versions/jruby-92/${{ matrix.batch }} | |
- name: Debug with SSH connection | |
if: "${{ failure() && env.RUNNER_DEBUG == '1' }}" | |
uses: mxschmitt/action-tmate@e5c7151931ca95bad1c6f4190c730ecf8c7dde48 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Validate test agent data | |
if: "!cancelled()" | |
run: ruby .github/scripts/test_agent_check.rb | |
- name: Upload junit reports | |
if: "!cancelled()" | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: junit-jruby-92-${{ matrix.batch }}-${{ github.run_id }} | |
path: tmp/rspec/*.xml | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: coverage-jruby-92-${{ matrix.batch }}-${{ github.run_id }} | |
path: coverage | |
include-hidden-files: true | |
complete: | |
name: complete | |
runs-on: ubuntu-24.04 | |
needs: | |
- build-test-ruby-34 | |
- build-test-ruby-33 | |
- build-test-ruby-32 | |
- build-test-ruby-31 | |
- build-test-ruby-30 | |
- build-test-ruby-27 | |
- build-test-ruby-26 | |
- build-test-ruby-25 | |
- build-test-jruby-94 | |
- build-test-jruby-93 | |
- build-test-jruby-92 | |
steps: | |
- run: echo "DONE!" | |
upload-junit: | |
name: dd/junit | |
if: "!cancelled()" | |
runs-on: ubuntu-24.04 | |
container: | |
image: datadog/ci | |
credentials: | |
username: "${{ secrets.DOCKERHUB_USERNAME }}" | |
password: "${{ secrets.DOCKERHUB_TOKEN }}" | |
env: | |
DD_API_KEY: "${{ secrets.DD_API_KEY }}" | |
DD_ENV: ci | |
DATADOG_SITE: datadoghq.com | |
DD_SERVICE: dd-trace-rb | |
DD_GIT_REPOSITORY_URL: "${{ github.repositoryUrl }}" | |
needs: | |
- build-test-ruby-34 | |
- build-test-ruby-33 | |
- build-test-ruby-32 | |
- build-test-ruby-31 | |
- build-test-ruby-30 | |
- build-test-ruby-27 | |
- build-test-ruby-26 | |
- build-test-ruby-25 | |
- build-test-jruby-94 | |
- build-test-jruby-93 | |
- build-test-jruby-92 | |
steps: | |
- run: mkdir -p tmp/rspec && datadog-ci version | |
- name: Download all junit reports | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
path: tmp/rspec | |
pattern: junit-* | |
merge-multiple: true | |
- name: Format file paths | |
run: sed -i 's;file="./;file=";g' tmp/rspec/*.xml | |
- if: github.event_name == 'pull_request' | |
run: echo "DD_GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV | |
- if: github.event_name != 'pull_request' | |
run: echo "DD_GIT_COMMIT_SHA=${{ github.sha }}" >> $GITHUB_ENV | |
- run: echo $DD_GIT_COMMIT_SHA | |
- name: Upload junit reports | |
run: datadog-ci junit upload --verbose tmp/rspec/ | |
coverage: | |
name: codecov/upload | |
runs-on: ubuntu-24.04 | |
needs: | |
- build-test-ruby-34 | |
- build-test-ruby-33 | |
- build-test-ruby-32 | |
- build-test-ruby-31 | |
- build-test-ruby-30 | |
- build-test-ruby-27 | |
- build-test-ruby-26 | |
- build-test-ruby-25 | |
- build-test-jruby-94 | |
- build-test-jruby-93 | |
- build-test-jruby-92 | |
- batch-ruby-34 | |
container: | |
image: ghcr.io/datadog/images-rb/engines/ruby:3.4 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Download lockfile | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: lockfile-ruby-34-${{ github.run_id }} | |
- name: Restore cache | |
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 | |
id: restore-cache | |
with: | |
key: "${{ needs.batch-ruby-34.outputs.cache-key }}" | |
path: "/usr/local/bundle" | |
- run: bundle check || bundle install | |
- name: Download all coverage data | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
path: coverage | |
pattern: coverage-* | |
merge-multiple: true | |
- name: Generate coverage report | |
run: bundle exec rake coverage:report | |
- name: Upload coverage report | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 | |
with: | |
files: coverage/report/coverage.xml |