@@ -31,58 +31,58 @@ jobs:
31
31
DD_HOSTNAME : " none"
32
32
DD_INSIDE_CI : " true"
33
33
steps :
34
- - name : Get GitHub App token
35
- if : github.event_name == 'pull_request'
36
- id : get_token
37
-
38
- with :
39
- app_id : ${{ secrets.PIPELINE_GITHUB_APP_ID }}
40
- private_key : ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
41
- repository : DataDog/datadog-api-spec
42
- - name : Checkout code
43
- uses : actions/checkout@v2
44
- - name : Post pending status check
45
- if : github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
46
-
47
- with :
48
- github-token : ${{ steps.get_token.outputs.token }}
49
- script : |
50
- const script = require('.github/workflows/scripts/test_integration.js')
51
- await script.post_status_check(github, context, "pending")
52
- - name : Set up Python 3.8
53
- uses : actions/setup-python@v2
54
- with :
55
- python-version : 3.8
56
- - name : Install
57
- run : pip install --disable-pip-version-check -e .[apm,tests]
58
- - name : Test
59
- run : ./run-tests.sh
60
- shell : bash
61
- env :
62
- CI : " true"
63
- DD_AGENT_HOST : localhost
64
- DD_ENV : prod
65
- DD_SERVICE : datadog-api-client-python
66
- DD_TAGS : " team:integration-tools-and-libraries"
67
- DD_TEST_CLIENT_API_KEY : ${{ secrets.DD_CLIENT_API_KEY }}
68
- DD_TEST_CLIENT_APP_KEY : ${{ secrets.DD_CLIENT_APP_KEY }}
69
- DD_TRACE_ANALYTICS_ENABLED : " true"
70
- RECORD : " none"
71
- PYTEST_ADDOPTS : " --ddtrace"
72
- DD_PYTEST_OPERATION_NAME : " test"
73
- - name : Post failure status check
74
- if : failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
75
-
76
- with :
77
- github-token : ${{ steps.get_token.outputs.token }}
78
- script : |
79
- const script = require('./.github/workflows/scripts/test_integration.js')
80
- await script.post_status_check(github, context, "failure")
81
- - name : Post success status check
82
- if : " !failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')"
83
-
84
- with :
85
- github-token : ${{ steps.get_token.outputs.token }}
86
- script : |
87
- const script = require('./.github/workflows/scripts/test_integration.js')
88
- await script.post_status_check(github, context, "success")
34
+ - name : Get GitHub App token
35
+ if : github.event_name == 'pull_request'
36
+ id : get_token
37
+
38
+ with :
39
+ app_id : ${{ secrets.PIPELINE_GITHUB_APP_ID }}
40
+ private_key : ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
41
+ repository : DataDog/datadog-api-spec
42
+ - name : Checkout code
43
+ uses : actions/checkout@v2
44
+ - name : Post pending status check
45
+ if : github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
46
+
47
+ with :
48
+ github-token : ${{ steps.get_token.outputs.token }}
49
+ script : |
50
+ const script = require('.github/workflows/scripts/test_integration.js')
51
+ await script.post_status_check(github, context, "integration" , "pending")
52
+ - name : Set up Python 3.8
53
+ uses : actions/setup-python@v2
54
+ with :
55
+ python-version : 3.8
56
+ - name : Install
57
+ run : pip install --disable-pip-version-check -e .[apm,tests]
58
+ - name : Test
59
+ run : ./run-tests.sh
60
+ shell : bash
61
+ env :
62
+ CI : " true"
63
+ DD_AGENT_HOST : localhost
64
+ DD_ENV : prod
65
+ DD_SERVICE : datadog-api-client-python
66
+ DD_TAGS : " team:integration-tools-and-libraries"
67
+ DD_TEST_CLIENT_API_KEY : ${{ secrets.DD_CLIENT_API_KEY }}
68
+ DD_TEST_CLIENT_APP_KEY : ${{ secrets.DD_CLIENT_APP_KEY }}
69
+ DD_TRACE_ANALYTICS_ENABLED : " true"
70
+ RECORD : " none"
71
+ PYTEST_ADDOPTS : " --ddtrace"
72
+ DD_PYTEST_OPERATION_NAME : " test"
73
+ - name : Post failure status check
74
+ if : failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
75
+
76
+ with :
77
+ github-token : ${{ steps.get_token.outputs.token }}
78
+ script : |
79
+ const script = require('./.github/workflows/scripts/test_integration.js')
80
+ await script.post_status_check(github, context, "integration" , "failure")
81
+ - name : Post success status check
82
+ if : " !failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')"
83
+
84
+ with :
85
+ github-token : ${{ steps.get_token.outputs.token }}
86
+ script : |
87
+ const script = require('./.github/workflows/scripts/test_integration.js')
88
+ await script.post_status_check(github, context, "integration" , "success")
0 commit comments