Remove groupby_simple_monitor #11860
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Integration Tests | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- ready_for_review | |
- synchronize | |
- labeled | |
- unlabeled | |
branches: | |
- master | |
schedule: | |
- cron: "0 1 * * *" | |
concurrency: | |
group: integration-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
test_integration: | |
runs-on: ubuntu-latest | |
if: > | |
(github.event_name == 'pull_request' && | |
github.event.pull_request.draft == false && | |
!contains(github.event.pull_request.labels.*.name, 'ci/skip') && | |
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') && | |
contains(github.event.pull_request.labels.*.name, 'ci/integrations')) || | |
github.event_name == 'schedule' | |
services: | |
datadog-agent: | |
image: gcr.io/datadoghq/agent:latest | |
ports: | |
- 8126:8126 | |
env: | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
DD_HOSTNAME: "none" | |
DD_INSIDE_CI: "true" | |
steps: | |
- name: Get GitHub App token | |
if: github.event_name == 'pull_request' | |
id: get_token | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.PIPELINE_GITHUB_APP_ID }} | |
private_key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }} | |
repository: DataDog/datadog-api-spec | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Post pending status check | |
if: github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') | |
uses: DataDog/github-actions/post-status-check@v2 | |
with: | |
github-token: ${{ steps.get_token.outputs.token }} | |
repo: datadog-api-spec | |
status: pending | |
context: integration | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- name: Upgrade pip | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade wheel setuptools build | |
- name: Install | |
run: pip install --disable-pip-version-check -e .[apm,tests] | |
- name: Test | |
run: ./run-tests.sh | |
shell: bash | |
env: | |
DD_AGENT_HOST: localhost | |
DD_ENV: prod | |
DD_SERVICE: datadog-api-client-python | |
DD_TAGS: "team:integrations-tools-and-libraries" | |
DD_TEST_CLIENT_API_KEY: ${{ secrets.DD_CLIENT_API_KEY }} | |
DD_TEST_CLIENT_APP_KEY: ${{ secrets.DD_CLIENT_APP_KEY }} | |
RECORD: "none" | |
SLEEP_AFTER_REQUEST: ${{ vars.SLEEP_AFTER_REQUEST }} | |
PYTEST_ADDOPTS: "--ddtrace" | |
DD_PYTEST_OPERATION_NAME: "test" | |
DD_TRACE_PROPAGATION_STYLE_INJECT: "datadog" | |
- name: Post failure status check | |
if: failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/') | |
uses: DataDog/github-actions/post-status-check@v2 | |
with: | |
github-token: ${{ steps.get_token.outputs.token }} | |
repo: datadog-api-spec | |
status: failure | |
context: integration | |
- name: Post success status check | |
if: "!failure() && github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')" | |
uses: DataDog/github-actions/post-status-check@v2 | |
with: | |
github-token: ${{ steps.get_token.outputs.token }} | |
repo: datadog-api-spec | |
status: success | |
context: integration |