{"id":15022213,"url":"https://github.com/datadog/synthetics-ci-github-action","last_synced_at":"2025-04-06T01:09:38.197Z","repository":{"id":40467154,"uuid":"408479453","full_name":"DataDog/synthetics-ci-github-action","owner":"DataDog","description":"Use Browser and API tests in your CI/CD with Datadog Continuous Testing","archived":false,"fork":false,"pushed_at":"2025-04-03T16:34:04.000Z","size":31121,"stargazers_count":47,"open_issues_count":1,"forks_count":16,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-06T01:09:31.634Z","etag":null,"topics":["ci","continuous-integration","continuous-testing","datadog","github-actions"],"latest_commit_sha":null,"homepage":"https://docs.datadoghq.com/continuous_testing/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataDog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-20T14:38:17.000Z","updated_at":"2025-04-03T16:33:56.000Z","dependencies_parsed_at":"2023-09-22T17:26:41.432Z","dependency_job_id":"87a87d84-6763-4646-b151-e5db94e8a807","html_url":"https://github.com/DataDog/synthetics-ci-github-action","commit_stats":{"total_commits":286,"total_committers":22,"mean_commits":13.0,"dds":0.8321678321678322,"last_synced_commit":"143a54e9d3b1a014c4883ec6584257bf1822d1d8"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fsynthetics-ci-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fsynthetics-ci-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fsynthetics-ci-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataDog%2Fsynthetics-ci-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataDog","download_url":"https://codeload.github.com/DataDog/synthetics-ci-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419861,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","continuous-integration","continuous-testing","datadog","github-actions"],"created_at":"2024-09-24T19:57:39.167Z","updated_at":"2025-04-06T01:09:38.191Z","avatar_url":"https://github.com/DataDog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\n![GitHub Release](https://img.shields.io/github/v/release/DataDog/synthetics-ci-github-action)\n\nTrigger Synthetic tests from your GitHub workflows with the [Datadog CI Synthetics command][1].\n\n## Setup\n\nTo get started:\n\n1. Add your Datadog API and Application Keys as secrets to your GitHub repository. For more information, see [API and Application Keys][2].\n2. In your GitHub workflow, use `DataDog/synthetics-ci-github-action`.\n\nYour workflow can be [simple](#simple-workflows) or [complex](#complex-workflows).\n\n## Simple workflows\n\n### Example workflow using public IDs\n\n```yaml\nname: Run Synthetic tests using the test public IDs\njobs:\n  e2e_testing:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Datadog Synthetic tests\n        uses: DataDog/synthetics-ci-github-action@v2.1.0\n        with:\n          api_key: ${{secrets.DD_API_KEY}}\n          app_key: ${{secrets.DD_APP_KEY}}\n          public_ids: |\n            abc-d3f-ghi\n            jkl-mn0-pqr\n```\n\n### Example workflow using an existing `synthetics.json` file\n\n```yaml\nname: Run Synthetic tests using an existing synthetics.json file\njobs:\n  e2e_testing:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Datadog Synthetic tests\n        uses: DataDog/synthetics-ci-github-action@v2.1.0\n        with:\n          api_key: ${{secrets.DD_API_KEY}}\n          app_key: ${{secrets.DD_APP_KEY}}\n```\n\nFor an example test file, see this [`test.synthetics.json` file][12].\n\n**Note**: By default, this workflow runs all the tests listed in `{,!(node_modules)/**/}*.synthetics.json` files (every file ending with `.synthetics.json` except for those in the `node_modules` folder). You can also trigger a list of Synthetic tests by specifying a `public_id` or using a search query.\n\n## Complex workflows\n\n### Example workflow using the `test_search_query`\n\n```yaml\nname: Run Synthetic tests by test tag\njobs:\n  e2e_testing:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Datadog Synthetic tests\n        uses: DataDog/synthetics-ci-github-action@v2.1.0\n        with:\n          api_key: ${{secrets.DD_API_KEY}}\n          app_key: ${{secrets.DD_APP_KEY}}\n          test_search_query: 'tag:e2e-tests'\n```\n\n### Example workflow using a test search query and variable overrides\n\n```yaml\nname: Run Synthetic tests using search query\njobs:\n  e2e_testing:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Datadog Synthetic tests\n        uses: DataDog/synthetics-ci-github-action@v2.1.0\n        with:\n          api_key: ${{secrets.DD_API_KEY}}\n          app_key: ${{secrets.DD_APP_KEY}}\n          test_search_query: 'tag:staging'\n          variables: 'START_URL=https://staging.website.com,PASSWORD=stagingpassword'\n```\n\n### Example workflow using a global configuration file with `config_path`\n\nBy default, the path to the global configuration file is `datadog-ci.json`. You can override this path with the `config_path` input.\n\n```yaml\nname: Run Synthetic tests with custom config\njobs:\n  e2e_testing:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Datadog Synthetic tests\n        uses: DataDog/synthetics-ci-github-action@v2.1.0\n        with:\n          api_key: ${{secrets.DD_API_KEY}}\n          app_key: ${{secrets.DD_APP_KEY}}\n          config_path: './global.config.json'\n```\n\nFor an example of a global configuration file, see this [`global.config.json` file][13].\n\n## Inputs\n\n| Name                      | Type    | Requirement | Description                                                                                                                                                                                                                                  |\n| ------------------------- | ------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `api_key`                 | string  | _required_  | Your Datadog API key. This key is created by your [Datadog organization][2] and should be stored as a [secret][3]. **Default:** none.                                                                                                        |\n| `app_key`                 | string  | _required_  | Your Datadog Application key. This key is created by your [Datadog organization][2] and should be stored as a [secret][3]. **Default:** none.                                                                                                |\n| `batch_timeout`           | number  | _optional_  | The duration (in milliseconds) after which the batch fails as timed out. **Default:** 30 minutes.                                                                                                                                            |\n| `config_path`             | string  | _optional_  | The [global JSON configuration][4] to be used when launching tests. See the [example configuration file][13] for more details. **Default:** `datadog-ci.json`.                                                                               |\n| `datadog_site`            | string  | _optional_  | The [Datadog site][11] to send data to. **Default:** `datadoghq.com`.                                                                                                                                                                        |\n| `fail_on_critical_errors` | boolean | _optional_  | Fail the CI job if no tests were triggered, or results could not be fetched from Datadog. **Default:** `false`.                                                                                                                              |\n| `fail_on_missing_tests`   | boolean | _optional_  | Fail the CI job if at least one specified test with a public ID (using `public_ids` or listed in a [test file][12]) is missing in a run (for example, if it has been deleted programmatically or on the Datadog site). **Default:** `false`. |\n| `fail_on_timeout`         | boolean | _optional_  | Fail the CI job if at least one test exceeds the default test timeout. **Default:** `true`.                                                                                                                                                  |\n| `files`                   | string  | _optional_  | Glob pattern to detect Synthetic test configuration files. **Default:** `{,!(node_modules)/**/}*.synthetics.json`.                                                                                                                           |\n| `junit_report`            | string  | _optional_  | The filename for a JUnit report if you want to generate one. **Default:** none.                                                                                                                                                              |\n| `public_ids`              | string  | _optional_  | Public IDs of Synthetic tests to run, separated by new lines or commas. If no value is provided, tests are discovered in `*.synthetics.json` files. **Default:** none.                                                                       |\n| `subdomain`               | string  | _optional_  | The name of the custom subdomain set to access your Datadog application. If the URL used to access Datadog is `myorg.datadoghq.com`, the subdomain value needs to be set to `myorg`. **Default:** `app`.                                     |\n| `test_search_query`       | string  | _optional_  | Trigger tests corresponding to a [search query][5]. **Default:** none.                                                                                                                                                                       |\n| `tunnel`                  | boolean | _optional_  | Use the [Continuous Testing Tunnel][9] to execute your test batch. **Default:** `false`.                                                                                                                                                     |\n| `variables`               | string  | _optional_  | Key-value pairs for injecting variables into tests, separated by newlines or commas. For example: `START_URL=https://example.org,MY_VARIABLE=My title`. **Default:** `[]`.                                                                   |\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## Further reading\n\nAdditional helpful documentation, links, and articles:\n\n- [Continuous Testing and CI/CD Configuration][6]\n- [Best practices for continuous testing with Datadog][10]\n\n[1]: https://github.com/DataDog/datadog-ci\n[2]: https://docs.datadoghq.com/account_management/api-app-keys/\n[3]: https://docs.github.com/en/actions/reference/encrypted-secrets\n[4]: https://docs.datadoghq.com/continuous_testing/cicd_integrations/configuration/?tab=npm#setup-the-client\n[5]: https://docs.datadoghq.com/synthetics/search/#search\n[6]: https://docs.datadoghq.com/continuous_testing/cicd_integrations/configuration\n[7]: https://semver.org/#summary\n[8]: https://github.com/DataDog/synthetics-ci-github-action/tags\n[9]: https://docs.datadoghq.com/continuous_testing/testing_tunnel/\n[10]: https://www.datadoghq.com/blog/best-practices-datadog-continuous-testing/\n[11]: https://docs.datadoghq.com/getting_started/site\n[12]: https://docs.datadoghq.com/continuous_testing/cicd_integrations/configuration/?tab=npm#test-files\n[13]: https://github.com/DataDog/datadog-ci/blob/master/.github/workflows/e2e/global.config.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fsynthetics-ci-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadog%2Fsynthetics-ci-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadog%2Fsynthetics-ci-github-action/lists"}