Skip to content

Commit d3ca2d1

Browse files
committed
Skip TypeScript SDK unit tests for ts-sdk/docs changes
1 parent da0e331 commit d3ca2d1

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

‎dev/breeze/doc/ci/04_selective_checks.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ together using `pytest-xdist` (pytest-xdist distributes the tests among parallel
470470
canary and the changed tests must pass after it
471471
* `TS SDK unit tests` (the vitest suite run by `pnpm test` in `ts-sdk/`, exposed as the
472472
`run-ts-sdk-tests` output) run when `TS SDK files` change: anything under `ts-sdk/` except `.md`
473-
files, `ts-sdk/api-docs/`, and the docs toolchain's `ts-sdk/docs/package.json` and lock file.
473+
files, `ts-sdk/api-docs/`, and `ts-sdk/docs/` (the docs toolchain's own package).
474474
* `Java SDK E2E tests` (the `java_sdk` mode of the deployed-stack tests, exposed as the
475475
`run-java-sdk-e2e-tests` output) run when the Java SDK sources (`java-sdk/`, excluding `.md`), the
476476
Java test-fixture bundle (`airflow-e2e-tests/java-test-bundle/`), the Java e2e suite or its Docker
@@ -644,7 +644,7 @@ GitHub Actions to pass the list of parameters to a command to execute
644644
| run-task-sdk-tests | Whether Task SDK tests should be run ("true"/"false") | true | |
645645
| run-ts-sdk-docs | Whether the TypeScript SDK API reference should be built — on `ts-sdk/api-docs/`, `ts-sdk/docs/`, or `ts-sdk/src/` changes, including Markdown ("true"/"false") | true | |
646646
| run-ts-sdk-e2e-tests | Whether TypeScript SDK e2e tests should be run — on runtime-affecting `ts-sdk/`, TS e2e test, or Node coordinator changes ("true"/"false") | true | |
647-
| run-ts-sdk-tests | Whether TypeScript SDK unit tests should be run — on `ts-sdk/` changes except Markdown, `api-docs/`, and the docs toolchain's package files ("true"/"false") | true | |
647+
| run-ts-sdk-tests | Whether TypeScript SDK unit tests should be run — on `ts-sdk/` changes except Markdown, `api-docs/`, and `docs/` ("true"/"false") | true | |
648648
| run-ui-tests | Whether UI tests should be run ("true"/"false") | true | |
649649
| run-unit-tests | Whether unit tests should be run ("true"/"false") | true | |
650650
| run-www-tests | Whether Legacy WWW tests should be run ("true"/"false") | true | |

‎dev/breeze/src/airflow_breeze/utils/selective_checks.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,9 @@ def __hash__(self):
540540
],
541541
FileGroupForCi.TS_SDK_FILES: [
542542
# Documentation entry points and `.md` files do not affect the generated
543-
# supervisor schema. `ts-sdk/docs/package.json` and its lock file are excluded
544-
# too — they pin the docs toolchain's own dependencies and do not affect the SDK
545-
# build.
546-
r"^ts-sdk/(?!api-docs/)(?!.*\.md$)(?!docs/package(-lock)?\.json$).*",
543+
# supervisor schema or the unit tests. `ts-sdk/docs/` is excluded too — it is the
544+
# docs toolchain's own package, with its own tests that vitest does not run.
545+
r"^ts-sdk/(?!api-docs/)(?!docs/)(?!.*\.md$).*",
547546
],
548547
FileGroupForCi.ASSET_FILES: [
549548
r"^airflow-core/src/airflow/assets/",

‎dev/breeze/tests/test_selective_checks.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,14 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
15731573
},
15741574
id="Skip ts-sdk unit tests when only the docs toolchain's package.json changes",
15751575
),
1576+
pytest.param(
1577+
("ts-sdk/docs/typedoc.config.mjs",),
1578+
{
1579+
"run-ts-sdk-tests": "false",
1580+
"run-ts-sdk-docs": "true",
1581+
},
1582+
id="Skip ts-sdk unit tests but build docs when the docs toolchain config changes",
1583+
),
15761584
pytest.param(
15771585
("ts-sdk/docs/index.md",),
15781586
{
@@ -2045,6 +2053,11 @@ def test_java_sdk_conformance_hook_runs_for_serializer_changes(files: tuple[str,
20452053
True,
20462054
id="skipped when only the docs toolchain's lock file changes",
20472055
),
2056+
pytest.param(
2057+
("ts-sdk/docs/typedoc.config.mjs",),
2058+
True,
2059+
id="skipped when only the docs toolchain's config changes",
2060+
),
20482061
pytest.param(
20492062
("ts-sdk/api-docs/dag-authoring-api.ts",),
20502063
True,

0 commit comments

Comments
 (0)