-
Notifications
You must be signed in to change notification settings - Fork 380
64 lines (60 loc) · 2.23 KB
/
test_integration.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
name: Run Integration Tests
on: # yamllint disable-line rule:truthy
pull_request:
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: "0 */12 * * *"
concurrency:
group: ${{ github.head_ref || github.run_id }}-test-integration
cancel-in-progress: true
env:
TERRAFORM_VERSION: "1.5.3"
jobs:
integration_tests:
runs-on: ubuntu-latest
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'ci/integrations')) || github.event_name == 'schedule'
steps:
- name: Start the Datadog Agent locally
uses: datadog/agent-github-action@v1
with:
api_key: ${{ secrets.DD_API_KEY }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
cache: true
- uses: actions/cache@v3
with:
path: ~/.cache/terraform
key: terraform-${{ env.TERRAFORM_VERSION }}
- name: Install terraform
run: |
mkdir -p ~/.cache/terraform
if [ ! -f ~/.cache/terraform/terraform-${{ env.TERRAFORM_VERSION }} ]; then
wget https://releases.hashicorp.com/terraform/${{ env.TERRAFORM_VERSION }}/terraform_${{ env.TERRAFORM_VERSION }}_linux_amd64.zip -O ~/.cache/terraform/terraform-${{ env.TERRAFORM_VERSION }}
fi
unzip -o -d ~/.cache/terraform ~/.cache/terraform/terraform-${{ env.TERRAFORM_VERSION }}
- name: Run integration tests
run: make testacc
env:
RECORD: "none"
CI: "true"
DD_AGENT_HOST: localhost
DD_PROFILER_API_KEY: ${{ secrets.DD_API_KEY }}
DD_TEST_CLIENT_API_KEY: ${{ secrets.DD_CLIENT_API_KEY }}
DD_TEST_CLIENT_APP_KEY: ${{ secrets.DD_CLIENT_APP_KEY }}
DD_HTTP_CLIENT_RETRY_ENABLED: "true"
DD_ENV: prod
DD_SERVICE: terraform-provider-datadog
DD_VERSION: ${{ github.run_id }}
DD_TAGS: "team:integrations-tools-and-libraries"
TF_ACC_TERRAFORM_PATH: "/home/runner/.cache/terraform/terraform"
TF_ACC_TEMP_DIR: "/tmp"