Scheduled Continuous Integration #2893
This file contains hidden or 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
| name: Scheduled Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| schedule: | |
| - cron: '0 9 * * *' | |
| workflow_dispatch: | |
| 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: | |
| runs-on: ubuntu-22.04 | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 Unit and Env tests | |
| uses: ./.github/actions/run_unit_tests | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| multiverse: | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (${{ matrix.multiverse }}) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: ${{ matrix.multiverse }} | |
| pr-ci: false | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (services_1) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: services_1 | |
| pr-ci: false | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (services_2) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: services_2 | |
| pr-ci: false | |
| multiverse_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.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (services_elasticsearch) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: services_elasticsearch | |
| pr-ci: false | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (services_kafka) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: services_kafka | |
| pr-ci: false | |
| 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, 2.5.9, 2.6.10, 2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 (services_mysql_pg) | |
| uses: ./.github/actions/run_multiverse | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| group: services_mysql_pg | |
| pr-ci: false | |
| infinite_tracing: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby-version: [2.7.8, 3.0.7, 3.1.7, 3.2.8, 3.3.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 | |
| pr-ci: false | |
| notify_slack_fail: | |
| name: Notify slack fail | |
| needs: [unit_tests, multiverse, infinite_tracing, multiverse_services_1, multiverse_services_2, multiverse_elasticsearch, multiverse_services_kafka, multiverse_services_mysql_pg] | |
| runs-on: ubuntu-22.04 | |
| if: always() | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0 | |
| - uses: ./.github/actions/workflow-conclusion | |
| - uses: voxmedia/github-action-slack-notify-build@373da97827332b19e753c84d1e5b7937dbe0fbfa # tag v2 | |
| if: ${{ env.WORKFLOW_CONCLUSION == 'failure' && github.event_name != 'workflow_dispatch' }} | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }} | |
| with: | |
| channel: ruby-agent-notifications | |
| status: FAILED | |
| color: danger | |
| notify_slack_success: | |
| name: Notify slack success | |
| needs: [unit_tests, multiverse, infinite_tracing, multiverse_services_1, multiverse_services_2, multiverse_elasticsearch, multiverse_services_kafka, multiverse_services_mysql_pg] | |
| runs-on: ubuntu-22.04 | |
| if: always() | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0 | |
| - uses: ./.github/actions/workflow-conclusion | |
| - run: echo ${{ github.event_name }} | |
| - uses: Mercymeilya/last-workflow-status@3418710aefe8556d73b6f173a0564d38bcfd9a43 # tag v0.3.3 | |
| id: last_status | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: voxmedia/github-action-slack-notify-build@373da97827332b19e753c84d1e5b7937dbe0fbfa # tag v2 | |
| if: ${{ env.WORKFLOW_CONCLUSION == 'success' && steps.last_status.outputs.last_status == 'failure' && github.event_name != 'workflow_dispatch' }} | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }} | |
| with: | |
| channel: ruby-agent-notifications | |
| status: SUCCESS | |
| color: good |