forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (68 loc) · 2.27 KB
/
integration-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# This workflow is used to run an integration test.
# The most common use case is that it is triggered by another workflow,
# such as the Master Merge Queue Suite, or the Integration Comment.
#
# It can also be triggered on manual dispatch in CI however.
# In that use case, an input for the test name needs to be provided.
# TODO: check if the input is "all" , and run all, without a timeout?
name: Integration Test
on:
workflow_call:
inputs:
if:
required: false
type: boolean
test_name:
required: true
type: string
workflow_dispatch:
inputs:
test_name:
description: "Which integration to test."
required: true
type: string
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 }}
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:
test-integration:
runs-on: [linux, ubuntu-20.04-4core]
if: inputs.if || github.event_name == 'workflow_dispatch'
timeout-minutes: 45
steps:
- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: (PR comment) Checkout PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Checkout branch
if: ${{ github.event_name != 'issue_comment' }}
uses: actions/checkout@v3
- name: mock
run: echo "${{ inputs.test_name }}"
- run: make ci-sweep
# - run: sudo npm -g install @datadog/datadog-ci
- run: make test-integration-${{ inputs.test_name }}
env:
TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }}
# - name: Upload test results
# run: scripts/upload-test-results.sh
# if: always()
- run: make test-integration-${{ inputs.test_name }}-cleanup
if: ${{ always() }}
env:
TEST_DATADOG_API_KEY: ${{ secrets.CI_TEST_DATADOG_API_KEY }}