-
Notifications
You must be signed in to change notification settings - Fork 24
77 lines (72 loc) · 2.82 KB
/
test_integrations.yml
File metadata and controls
77 lines (72 loc) · 2.82 KB
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
name: Run Integrations Tests
permissions:
checks: write
contents: read
# Concurrency control: Only one integration test run at a time (queue mode)
concurrency:
group: integration-tests
cancel-in-progress: false
on:
push:
branches:
- michael.richey/regularly-run-integration-tests
pull_request:
branches:
- main
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened
schedule:
# Every day at 06:17 GMT
- cron: '17 6 * * *'
env:
DD_DESTINATION_API_KEY: ${{ secrets.DD_DESTINATION_API_KEY }}
DD_DESTINATION_APP_KEY: ${{ secrets.DD_DESTINATION_APP_KEY }}
DD_DESTINATION_API_URL: ${{ secrets.DD_DESTINATION_API_URL }}
DD_SOURCE_API_KEY: ${{ secrets.DD_SOURCE_API_KEY }}
DD_SOURCE_APP_KEY: ${{ secrets.DD_SOURCE_APP_KEY }}
DD_SOURCE_API_URL: ${{ secrets.DD_SOURCE_API_URL }}
DD_HTTP_CLIENT_RETRY_TIMEOUT: 300
jobs:
test-integrations:
runs-on: ubuntu-latest
timeout-minutes: 60 # Prevent hung tests from blocking the queue
services:
datadog-agent:
image: datadog/agent:latest
ports:
- 8126:8126
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_HOSTNAME: "none"
DD_INSIDE_CI: "true"
steps:
- name: Install Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: 3.12
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install datadog-sync for cleanup
run: pip install .
- name: Install tox
run: pip install tox
- name: Run integration tests
run: tox -e integration
env:
DD_AGENT_HOST: localhost
DD_ENV: ci
DD_SERVICE: datadog-sync-cli
DD_TAGS: "team:hamr"
DD_TRACE_ANALYTICS_ENABLED: "true"
RECORD: "none"
PYTEST_ADDOPTS: "--ddtrace --disable-recording --retries 3 --retry-delay 10"
- name: Post-failure cleanup of orphaned resources
if: failure()
run: |
yes | datadog-sync reset \
--verify-ddr-status=False \
--resources="authn_mappings,dashboard_lists,dashboards,host_tags,logs_archives,logs_archives_order,logs_indexes,logs_indexes_order,logs_metrics,logs_pipelines,logs_pipelines_order,logs_restriction_queries,metric_percentiles,metric_tag_configurations,metrics_metadata,monitors,notebooks,powerpacks,restriction_policies,rum_applications,security_monitoring_rules,sensitive_data_scanner_groups,sensitive_data_scanner_groups_order,sensitive_data_scanner_rules,service_level_objectives,slo_corrections,spans_metrics,synthetics_global_variables,synthetics_mobile_applications,synthetics_mobile_applications_versions,synthetics_private_locations,synthetics_tests,team_memberships,teams"