github-actions.md

June 4, 2026 ยท View on GitHub

system-tests expose an official reusable workflow that allow to create a simple workflow running system-tests

name: System Tests

on:
  pushes:
    branches:
      - main
  pull_request:
    branches:
      - "**"

jobs:
  # first, build the artifact to be tested. This part is related to your repo
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./build.sh
      - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
        with:
          name: binaries
          path: path/to/your/binary


  system-tests:
    needs:
      - build
    uses:  DataDog/system-tests/.github/workflows/system-tests.yml@main
      secrets: inherit
      permissions:
        contents: read
        id-token: write
      with:
        library: java
        binaries_artifact: binaries
        desired_execution_time: 900
        scenarios_groups: tracer-release
        skip_empty_scenarios: true

Parameters

NameDescriptionTypeRequiredDefault
artifact_retention_daysHow long should artifacts produced by the workflow should be retainednumberfalse14
binaries_artifactArtifact name containing the binaries to teststringfalseempty
desired_execution_timeIn seconds, system-tests will try to respect this time budget.numberfalseempty
excluded_scenariosComma-separated list of scenarios not to runstringfalseempty
force_executeComma-separated list of tests to run even if they are skipped by manifest or decoratorsstringfalseempty
libraryLibrary to teststringtrueโ€”
parametric_job_countHow many jobs should be used to run PARAMETRIC scenarionumberfalse1
push_to_test_optimizationPush tests results to DataDog Test Optimization. Fetches credentials automatically via dd-stsbooleanfalsefalse
test_optimization_datadog_siteDataDog site to use for test optimizationstringfalsedatadoghq.com
refsystem-tests ref to run the tests on (can be any valid branch, tag or SHA in system-tests repo)stringfalsemain
scenariosComma-separated list scenarios to runstringfalseDEFAULT
scenarios_groupsComma-separated list of scenarios groups to runstringfalseempty
skip_empty_scenariosSkip scenarios that contain only xfail or irrelevant testsbooleanfalsefalse

Note: if test_optimization_datadog_site is set to true, then the calling repo must be referenced in dd-sts.

Permissions

The following permissions are always required:

PermissionReason
contents: readCheckout the repository
id-token: writeRequired by downstream workflows to fetch Datadog credentials via dd-sts. GitHub validates this upfront, so it must be granted even if test optimization is disabled

Secrets

For some purposes, secrets are used in the workflow:

NameDescription
DD_API_KEYSome scenarios requires valid API and APP keys
DD_APPLICATION_KEY
DD_API_KEY_2
DD_APP_KEY_2
DD_API_KEY_3
DD_APP_KEY_3
DOCKERHUB_USERNAME and DOCKERHUB_TOKENIf both are set, all docker pull are authenticated, which offer higher rate limit

You can sends them ,either by using secrets: inherit (doc), or use explicit secret ids

Private parameters

Those parameters are used only by system-tests own CI

NameDescriptionTypeRequiredDefault
_system_tests_dev_modeShall we run system tests in dev mode (library and agent dev binary)booleanfalsefalse
_system_tests_library_target_branch_mapIf system-tests dev mode, JSON map of library to branch (e.g. {"java":"b1","dotnet":"b2"})stringfalse
_build_buddies_imagesShall we build buddies imagesbooleanfalsefalse
_build_proxy_imageShall we build proxy imagebooleanfalsefalse
_build_lambda_proxy_imageShall we build the lambda-proxy imagebooleanfalsefalse
_build_php_base_imagesShall we build php base images for tests on python tracerbooleanfalsefalse
_build_python_base_imagesShall we build python base images for tests on python tracerbooleanfalsefalse
_enable_replay_scenariosEnable replay scenarios, should only be used in system-tests CIbooleanfalsefalse