Skip to content

testing upload

testing upload #101

# Integration Test Comment
#
# This workflow runs one or more integration tests triggered by a comment in a PR.
# The comment include '/ci-run-integration'.
# Then, any if the integration names will trigger that specific integration.
# 'all' will trigger every integration to run.
# The order does not matter and can be anywhere inside the comment body.
#
# Examples:
#
# 1. Run a single integration test:
#
# /ci-run-integration amqp
#
# 2. Run three specific integration tests:
#
# /ci-run-integration dnstap redis amqp
#
# 3. Run all integration tests:
#
# /ci-run-integration all
name: Integration Test Comment
on:
issue_comment:
types: [created]
env:
AWS_ACCESS_KEY_ID: "dummy"
AWS_SECRET_ACCESS_KEY: "dummy"
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
TEST_APPSIGNAL_PUSH_API_KEY: ${{ secrets.TEST_APPSIGNAL_PUSH_API_KEY }}
TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }}
CONTAINER_TOOL: "docker"
DD_ENV: "ci"
DD_API_KEY: ${{ secrets.DD_API_KEY }}
RUST_BACKTRACE: full
TEST_LOG: vector=debug
VERBOSE: true
CI: true
PROFILE: debug
jobs:
prep-pr:
name: (PR comment) Signal pending to PR
runs-on: ubuntu-latest
if: contains(github.event.comment.body, '/ci-run-integration') || contains(github.event.comment.body, '/ci-run-all')
steps:
- name: Get PR comment author
id: comment
uses: tspascoal/get-user-teams-membership@v2
with:
username: ${{ github.actor }}
team: 'Vector'
GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }}
- name: Validate author membership
if: steps.comment.outputs.isTeamMember == 'false'
run: exit 1
- name: (PR comment) Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: (PR comment) Set latest commit status as pending
uses: myrotvorets/set-commit-status-action@v1.1.7
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
integration-tests:
needs: prep-pr
runs-on: [linux, ubuntu-20.04-4core]
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- run: sudo npm -g install @datadog/datadog-ci
- run: docker image prune -af ; docker container prune -f
- name: amqp
env:
FOO: "hihi"
if: ${{ contains(github.event.comment.body, '/ci-run-integration-amqp') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
# First one requires more time, as we need to build the image from scratch
timeout_minutes: 30
max_attempts: 3
shell: bash
command: scripts/ci-integration-test.sh amqp
- run: ./scripts/upload-test-results.sh
# - name: appsignal
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-appsignal') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# shell: bash
# command: scripts/ci-integration-test.sh appsignal
- name: aws
if: ${{ contains(github.event.comment.body, '/ci-run-integration-aws') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
shell: bash
command: scripts/ci-integration-test.sh aws
# - name: axiom
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-axiom') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh axiom
- name: azure
if: ${{ contains(github.event.comment.body, '/ci-run-integration-azure') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
shell: bash
command: scripts/ci-integration-test.sh azure
- name: clickhouse
if: ${{ contains(github.event.comment.body, '/ci-run-integration-clickhouse') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh clickhouse
# - name: databend
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-databend') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh databend
# - name: datadog-agent
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-agent') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh datadog-agent
# - name: datadog-logs
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-logs') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh datadog-logs
# - name: datadog-metrics
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-metrics') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh datadog-metrics
# - name: datadog-traces
# if: ${{ contains(github.event.comment.body, '/ci-run-integration-datadog-traces') || contains(github.event.comment.body, '/ci-run-all') }}
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 30
# max_attempts: 3
# command: bash scripts/ci-integration-test.sh datadog-traces
- name: dnstap
if: ${{ contains(github.event.comment.body, '/ci-run-integration-dnstap') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh dnstap
- run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f
- name: docker-logs
if: ${{ contains(github.event.comment.body, '/ci-run-integration-docker-logs') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh docker-logs
- name: elasticsearch
if: ${{ contains(github.event.comment.body, '/ci-run-integration-elasticsearch') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh elasticsearch
- name: eventstoredb
if: ${{ contains(github.event.comment.body, '/ci-run-integration-eventstoredb') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh eventstoredb
- name: fluent
if: ${{ contains(github.event.comment.body, '/ci-run-integration-fluent') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh fluent
- name: gcp
if: ${{ contains(github.event.comment.body, '/ci-run-integration-gcp') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh gcp
- name: humio
if: ${{ contains(github.event.comment.body, '/ci-run-integration-humio') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh humio
- name: http-client
if: ${{ contains(github.event.comment.body, '/ci-run-integration-http-client') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh http-client
- name: influxdb
if: ${{ contains(github.event.comment.body, '/ci-run-integration-influxdb') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh influxdb
- name: kafka
if: ${{ contains(github.event.comment.body, '/ci-run-integration-kafka') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh kafka
- name: logstash
if: ${{ contains(github.event.comment.body, '/ci-run-integration-logstash') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh logstash
- name: loki
if: ${{ contains(github.event.comment.body, '/ci-run-integration-loki') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh loki
- name: mongodb
if: ${{ contains(github.event.comment.body, '/ci-run-integration-mongodb') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh mongodb
- run: docker image prune -af --filter=label!=vector-test-runner=true ; docker container prune -f
- name: nats
if: ${{ contains(github.event.comment.body, '/ci-run-integration-nats') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh nats
- name: nginx
if: ${{ contains(github.event.comment.body, '/ci-run-integration-nginx') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh nginx
- name: opentelemetry
if: ${{ contains(github.event.comment.body, '/ci-run-integration-opentelemetry') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh opentelemetry
- name: postgres
if: ${{ contains(github.event.comment.body, '/ci-run-integration-postgres') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh postgres
- name: prometheus
if: ${{ contains(github.event.comment.body, '/ci-run-integration-prometheus') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh prometheus
- name: pulsar
if: ${{ contains(github.event.comment.body, '/ci-run-integration-pulsar') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh pulsar
- name: redis
if: ${{ contains(github.event.comment.body, '/ci-run-integration-redis') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh redis
- name: shutdown
if: ${{ contains(github.event.comment.body, '/ci-run-integration-shutdown') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh shutdown
- name: splunk
if: ${{ contains(github.event.comment.body, '/ci-run-integration-splunk') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh splunk
- name: webhdfs
if: ${{ contains(github.event.comment.body, '/ci-run-integration-webhdfs') || contains(github.event.comment.body, '/ci-run-all') }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
command: bash scripts/ci-integration-test.sh webhdfs
update-pr-status:
name: Signal result to PR
runs-on: ubuntu-latest
needs: integration-tests
if: always() && (contains(github.event.comment.body, '/ci-run-integration') || contains(github.event.comment.body, '/ci-run-all'))
steps:
- name: Validate issue comment
if: github.event_name == 'issue_comment'
uses: tspascoal/get-user-teams-membership@v2
with:
username: ${{ github.actor }}
team: 'Vector'
GITHUB_TOKEN: ${{ secrets.GH_PAT_ORG }}
- name: (PR comment) Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: (PR comment) Submit PR result as ${{ needs.integration-tests.result }}
uses: myrotvorets/set-commit-status-action@v1.1.7
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ needs.integration-tests.result }}