Skip to content

Validate record_custom_event type #7022

Validate record_custom_event type

Validate record_custom_event type #7022

Workflow file for this run

name: PR Continuous Integration
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
cancel-in-progress: true # Cancel any previous runs of this workflow
jobs:
run_rubocop:
runs-on: ubuntu-22.04
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # tag v1.267.0
with:
ruby-version: 3.4
- run: bundle
- run: rubocop
unit_tests:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
CI_FOR_PR: true
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- "3306:3306"
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Unit and Env tests
uses: ./.github/actions/run_unit_tests
with:
ruby-version: ${{ matrix.ruby-version }}
multiverse:
needs: run_rubocop
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
multiverse: [agent, ai, background, background_2, frameworks, httpclients, httpclients_2, hybrid_agent, rails, rest]
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (${{ matrix.multiverse }})
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: ${{ matrix.multiverse }}
multiverse_services_1:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
mongodb:
image: ${{ contains(fromJson('["2.4.10"]'), matrix.ruby-version) && 'mongo:5.0.11' || 'mongo:latest' }}
ports:
- 27017:27017
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmq-diagnostics -q check_port_connectivity"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (services_1)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: services_1
multiverse_services_2:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
memcached:
image: memcached:latest
ports:
- 11211:11211
options: >-
--health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:latest
env:
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (services_2)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: services_2
multiverse_services_elasticsearch:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
elasticsearch7:
image: elasticsearch:7.16.2
env:
discovery.type: single-node
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
elasticsearch9:
image: elasticsearch:9.0.2
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9252:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (services_elasticsearch)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: services_elasticsearch
multiverse_services_kafka:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.9.1
ports:
- 2181:2181
env:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
options: >-
--health-cmd "timeout 10s bash -c '</dev/tcp/localhost/2181'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
kafka:
image: confluentinc/cp-kafka:7.9.1
ports:
- 9092:9092
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
options: >-
--health-cmd "timeout 10s bash -c '</dev/tcp/localhost/9092'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (services_kafka)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: services_kafka
multiverse_services_mysql_pg:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 3306
postgres:
image: postgres:latest
env:
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (services_mysql_pg)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: services_mysql_pg
infinite_tracing:
needs: run_rubocop
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby-version: [2.7.8, 3.4.4]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- name: Run Multiverse (infinite_tracing)
uses: ./.github/actions/run_multiverse
with:
ruby-version: ${{ matrix.ruby-version }}
group: infinite_tracing
simplecov:
needs: [unit_tests, multiverse, infinite_tracing, multiverse_services_1, multiverse_services_2, multiverse_services_elasticsearch, multiverse_services_kafka, multiverse_services_mysql_pg]
runs-on: ubuntu-22.04
if: github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # tag v1.267.0
with:
ruby-version: 3.4
- run: bundle
- name: Download all workflow run artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # tag v6.0.0
- name: Collate Coverage Results
run: bundle exec rake coverage:report
- name: Upload coverage results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # tag v5.0.0
with:
name: coverage-report-combined-${{ matrix.ruby-version }}
path: lib/coverage_results
include-hidden-files: true
retention-days: 2
- name: Simplecov Report
uses: ./.github/actions/simplecov-report
with:
token: ${{ secrets.GITHUB_TOKEN }}
resultPath: lib/coverage_results/.last_run.json
failedThreshold: 93.5
failedThresholdBranch: 0