Add Datadog Synthetic tests workflow - #42922
johnny1494 wants to merge 1 commit into
Conversation
This workflow triggers Datadog Synthetic tests on push and pull request events to the main branch, utilizing the Datadog Synthetics CI GitHub action.
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. This pull request contains code changes, so we will not generate a table of review links. 🤖 This comment is automatically generated. |
|
👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions:
You'll need to revert all of the files you changed that match that list using GitHub Desktop or The complete list of files we can't accept are:
We also can't accept contributions to files in the content directory with frontmatter |
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to run Datadog Synthetic tests as part of CI for the repository.
Changes:
- Introduces
.github/workflows/datadog-synthetics.ymlto run Datadog Synthetics CI onpushandpull_requestevents targetingmain. - Configures the workflow to authenticate via
DD_API_KEYandDD_APP_KEYsecrets and run tests using a tag-based search query.
| - uses: actions/checkout@v4 | ||
|
|
||
| # Run Synthetic tests within your GitHub workflow. | ||
| # For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci | ||
| - name: Run Datadog Synthetic tests | ||
| uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0 | ||
| with: | ||
| api_key: ${{secrets.DD_API_KEY}} | ||
| app_key: ${{secrets.DD_APP_KEY}} | ||
| test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy |
There was a problem hiding this comment.
steps: list items are not indented under the steps: key (the - uses: line is aligned with steps:). This makes the workflow YAML invalid and will prevent the workflow from running. Indent the step entries (and the following - name: step) one level deeper than steps:.
| - uses: actions/checkout@v4 | |
| # Run Synthetic tests within your GitHub workflow. | |
| # For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci | |
| - name: Run Datadog Synthetic tests | |
| uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0 | |
| with: | |
| api_key: ${{secrets.DD_API_KEY}} | |
| app_key: ${{secrets.DD_APP_KEY}} | |
| test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy | |
| - uses: actions/checkout@v4 | |
| # Run Synthetic tests within your GitHub workflow. | |
| # For additional configuration options visit the action within the marketplace: https://github.com/marketplace/actions/datadog-synthetics-ci | |
| - name: Run Datadog Synthetic tests | |
| uses: DataDog/synthetics-ci-github-action@87b505388a22005bb8013481e3f73a367b9a53eb # v1.4.0 | |
| with: | |
| api_key: ${{secrets.DD_API_KEY}} | |
| app_key: ${{secrets.DD_APP_KEY}} | |
| test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
This workflow uses actions/checkout@v4, but the rest of the repo’s workflows generally use actions/checkout v6 and often pin to a full commit SHA. To stay consistent and reduce supply-chain risk, update this to the same pinned version used elsewhere in .github/workflows (e.g., the v6.0.1 SHA).
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v6.0.1 |
| with: | ||
| api_key: ${{secrets.DD_API_KEY}} | ||
| app_key: ${{secrets.DD_APP_KEY}} | ||
| test_search_query: 'tag:e2e-tests' #Modify this tag to suit your tagging strategy |
There was a problem hiding this comment.
This workflow references DD_API_KEY/DD_APP_KEY repository secrets. When triggered by pull_request from a fork, secrets are not provided, so this step will fail and can create a permanently failing PR check for external contributors. Consider adding an if: guard to skip when secrets are unavailable, or restrict execution to trusted events (e.g., push/workflow_dispatch).
This workflow triggers Datadog Synthetic tests on push and pull request events to the main branch, utilizing the Datadog Synthetics CI GitHub action.
Why:
Closes:
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following: