From 6de35c8638ce9da853d51af53d283822c7b72682 Mon Sep 17 00:00:00 2001 From: Brett Langdon Date: Mon, 16 Dec 2024 17:06:28 -0500 Subject: [PATCH] ci: add clearer breakdown of test stages and dependencies between jobs (#11712) --- .gitlab/tests.yml | 11 +++++++---- scripts/gen_gitlab_config.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitlab/tests.yml b/.gitlab/tests.yml index 83a5d4231b8..4495c6fa6a6 100644 --- a/.gitlab/tests.yml +++ b/.gitlab/tests.yml @@ -1,5 +1,7 @@ stages: - - tests + - precheck + - hatch + - riot variables: RIOT_RUN_CMD: riot -P -v run --exitfirst --pass-env -s @@ -22,7 +24,7 @@ variables: .test_base_hatch: extends: .testrunner - stage: tests + stage: hatch # Hatch doesn't use pre-built wheels or venvs so we can start them right away needs: [] parallel: 4 @@ -57,7 +59,7 @@ variables: build_base_venvs: extends: .testrunner - stage: tests + stage: riot parallel: matrix: - PYTHON_VERSION: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] @@ -76,9 +78,10 @@ build_base_venvs: - ddtrace/internal/datadog/profiling/crashtracker/crashtracker_exe* - ddtrace/internal/datadog/profiling/test/test_* +# Do not define a `needs:` in order to depend on the whole `precheck` stage .test_base_riot: extends: .testrunner - stage: tests + stage: riot needs: [ build_base_venvs ] parallel: 4 services: diff --git a/scripts/gen_gitlab_config.py b/scripts/gen_gitlab_config.py index 2b139ce798d..c868b0f1c86 100644 --- a/scripts/gen_gitlab_config.py +++ b/scripts/gen_gitlab_config.py @@ -114,7 +114,7 @@ def check(name: str, command: str, paths: t.Set[str]) -> None: with TESTS_GEN.open("a") as f: print(f'"{name}":', file=f) print(" extends: .testrunner", file=f) - print(" stage: tests", file=f) + print(" stage: precheck", file=f) print(" needs: []", file=f) print(" script:", file=f) print(f" - {command}", file=f)