Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci-amd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
run-coverage: ${{ steps.source-run-info.outputs.run-coverage }}
run-go-sdk-tests: ${{ steps.selective-checks.outputs.run-go-sdk-tests }}
run-java-sdk-tests: ${{ steps.selective-checks.outputs.run-java-sdk-tests }}
run-ts-sdk-tests: ${{ steps.selective-checks.outputs.run-ts-sdk-tests }}
run-ts-sdk-docs: ${{ steps.selective-checks.outputs.run-ts-sdk-docs }}
run-helm-tests: ${{ steps.selective-checks.outputs.run-helm-tests }}
run-kubernetes-tests: ${{ steps.selective-checks.outputs.run-kubernetes-tests }}
Expand Down Expand Up @@ -1029,6 +1030,40 @@ jobs:
go install golang.org/x/vuln/cmd/govulncheck@v1.6.0
govulncheck ./...

tests-ts-sdk:
name: "TypeScript SDK tests"
needs: [build-info]
runs-on: ${{ fromJSON(needs.build-info.outputs.runner-type) }}
timeout-minutes: 15
permissions:
contents: read
if: needs.build-info.outputs.run-ts-sdk-tests == 'true'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
package_json_file: ts-sdk/package.json
run_install: false
# keep this in sync with the Node version in ts-sdk-release.yml
- name: Setup node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24.19.0"
cache: 'pnpm'
cache-dependency-path: ts-sdk/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./ts-sdk
run: pnpm install --frozen-lockfile
- name: Run TypeScript SDK tests
working-directory: ./ts-sdk
run: pnpm test
env:
FORCE_COLOR: 2

tests-java-sdk:
name: "Java SDK tests"
needs: [build-info]
Expand Down Expand Up @@ -1194,6 +1229,7 @@ jobs:
- tests-airflow-ctl
- tests-go-sdk
- tests-java-sdk
- tests-ts-sdk
- build-java-sdk-docs
- build-ts-sdk-docs
- tests-with-lowest-direct-resolution-core
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ci-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
run-coverage: ${{ steps.source-run-info.outputs.run-coverage }}
run-go-sdk-tests: ${{ steps.selective-checks.outputs.run-go-sdk-tests }}
run-java-sdk-tests: ${{ steps.selective-checks.outputs.run-java-sdk-tests }}
run-ts-sdk-tests: ${{ steps.selective-checks.outputs.run-ts-sdk-tests }}
run-ts-sdk-docs: ${{ steps.selective-checks.outputs.run-ts-sdk-docs }}
run-helm-tests: ${{ steps.selective-checks.outputs.run-helm-tests }}
run-kubernetes-tests: ${{ steps.selective-checks.outputs.run-kubernetes-tests }}
Expand Down Expand Up @@ -1018,6 +1019,40 @@ jobs:
go install golang.org/x/vuln/cmd/govulncheck@v1.6.0
govulncheck ./...

tests-ts-sdk:
name: "TypeScript SDK tests"
needs: [build-info]
runs-on: ${{ fromJSON(needs.build-info.outputs.runner-type) }}
timeout-minutes: 15
permissions:
contents: read
if: needs.build-info.outputs.run-ts-sdk-tests == 'true'
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
package_json_file: ts-sdk/package.json
run_install: false
# keep this in sync with the Node version in ts-sdk-release.yml
- name: Setup node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24.19.0"
cache: 'pnpm'
cache-dependency-path: ts-sdk/pnpm-lock.yaml
- name: Install dependencies
working-directory: ./ts-sdk
run: pnpm install --frozen-lockfile
- name: Run TypeScript SDK tests
working-directory: ./ts-sdk
run: pnpm test
env:
FORCE_COLOR: 2

tests-java-sdk:
name: "Java SDK tests"
needs: [build-info]
Expand Down Expand Up @@ -1183,6 +1218,7 @@ jobs:
- tests-airflow-ctl
- tests-go-sdk
- tests-java-sdk
- tests-ts-sdk
- build-java-sdk-docs
- build-ts-sdk-docs
- tests-with-lowest-direct-resolution-core
Expand Down
4 changes: 4 additions & 0 deletions dev/breeze/doc/ci/04_selective_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ together using `pytest-xdist` (pytest-xdist distributes the tests among parallel
(`PROVIDERS_WITH_PROCESS_GLOBAL_TEST_SIDE_EFFECTS`, currently `cncf.kubernetes`), the side-effect
provider is added to the same `Providers[...]` test type, because the two share one pytest process on
canary and the changed tests must pass after it
* `TS SDK unit tests` (the vitest suite run by `pnpm test` in `ts-sdk/`, exposed as the
`run-ts-sdk-tests` output) run when `TS SDK files` change: anything under `ts-sdk/` except `.md`
files, `ts-sdk/api-docs/`, and `ts-sdk/docs/` (the docs toolchain's own package).
* `Java SDK E2E tests` (the `java_sdk` mode of the deployed-stack tests, exposed as the
`run-java-sdk-e2e-tests` output) run when the Java SDK sources (`java-sdk/`, excluding `.md`), the
Java test-fixture and native-Dag bundles (`airflow-e2e-tests/java-test-bundle/`,
Expand Down Expand Up @@ -648,6 +651,7 @@ GitHub Actions to pass the list of parameters to a command to execute
| run-task-sdk-tests | Whether Task SDK tests should be run ("true"/"false") | true | |
| 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 | |
| run-ts-sdk-e2e-tests | Whether TypeScript SDK e2e tests should be run — on runtime-affecting `ts-sdk/`, TS e2e test, Node coordinator, or native Lang-SDK Dag parsing changes ("true"/"false") | true | |
| 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 | |
| run-ui-tests | Whether UI tests should be run ("true"/"false") | true | |
| run-unit-tests | Whether unit tests should be run ("true"/"false") | true | |
| run-www-tests | Whether Legacy WWW tests should be run ("true"/"false") | true | |
Expand Down
11 changes: 7 additions & 4 deletions dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,9 @@ def __hash__(self):
],
FileGroupForCi.TS_SDK_FILES: [
# Documentation entry points and `.md` files do not affect the generated
# supervisor schema. `ts-sdk/docs/package.json` and its lock file are excluded
# too — they pin the docs toolchain's own dependencies and do not affect the SDK
# build.
r"^ts-sdk/(?!api-docs/)(?!.*\.md$)(?!docs/package(-lock)?\.json$).*",
# supervisor schema or the unit tests. `ts-sdk/docs/` is excluded too — it is the
# docs toolchain's own package, with its own tests that vitest does not run.
r"^ts-sdk/(?!api-docs/)(?!docs/)(?!.*\.md$).*",
],
FileGroupForCi.ASSET_FILES: [
r"^airflow-core/src/airflow/assets/",
Expand Down Expand Up @@ -1353,6 +1352,10 @@ def run_go_sdk_tests(self) -> bool:
def run_java_sdk_tests(self) -> bool:
return self._should_be_run(FileGroupForCi.JAVA_SDK_FILES)

@cached_property
def run_ts_sdk_tests(self) -> bool:
return self._should_be_run(FileGroupForCi.TS_SDK_FILES)

@cached_property
def run_ts_sdk_docs(self) -> bool:
return self._should_be_run(FileGroupForCi.TS_SDK_DOCS_FILES)
Expand Down
1 change: 1 addition & 0 deletions dev/breeze/src/airflow_breeze/utils/verification_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class VerificationItem:
("unit", "cd java-sdk && ./gradlew test", "host"),
("docs", "breeze build-docs --sdk-docs-only --sdk=java", "breeze"),
),
"run_ts_sdk_tests": (("unit", "cd ts-sdk && pnpm install --frozen-lockfile && pnpm test", "host"),),
"run_ts_sdk_docs": (("docs", "breeze build-docs --sdk-docs-only --sdk=typescript", "breeze"),),
"run_agent_framework_tests": (
(
Expand Down
36 changes: 34 additions & 2 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,13 +1553,38 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("ts-sdk/src/sdk/client.ts",),
{
"run-ts-sdk-tests": "true",
"run-ts-sdk-docs": "true",
},
id="Build ts-sdk docs when the documented sources change",
id="Run ts-sdk unit tests and build docs when the documented sources change",
),
pytest.param(
("ts-sdk/pnpm-lock.yaml",),
{
"run-ts-sdk-tests": "true",
"run-ts-sdk-docs": "false",
},
id="Run ts-sdk unit tests when the lock file changes",
),
pytest.param(
("ts-sdk/docs/package.json",),
{
"run-ts-sdk-tests": "false",
},
id="Skip ts-sdk unit tests when only the docs toolchain's package.json changes",
),
pytest.param(
("ts-sdk/docs/typedoc.config.mjs",),
{
"run-ts-sdk-tests": "false",
"run-ts-sdk-docs": "true",
},
id="Skip ts-sdk unit tests but build docs when the docs toolchain config changes",
),
pytest.param(
("ts-sdk/docs/index.md",),
{
"run-ts-sdk-tests": "false",
"run-ts-sdk-docs": "true",
"run-ts-sdk-e2e-tests": "false",
},
Expand All @@ -1568,6 +1593,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("ts-sdk/api-docs/dag-authoring-api.ts",),
{
"run-ts-sdk-tests": "false",
"run-ts-sdk-docs": "true",
"run-ts-sdk-e2e-tests": "false",
"prod-image-build": "false",
Expand All @@ -1591,9 +1617,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str):
pytest.param(
("ts-sdk/README.md",),
{
"run-ts-sdk-tests": "false",
"run-ts-sdk-docs": "false",
},
id="Skip ts-sdk docs build for a ts-sdk README-only change",
id="Skip ts-sdk unit tests and docs build for a ts-sdk README-only change",
),
pytest.param(
("airflow-e2e-tests/java-test-bundle/src/java/org/apache/airflow/e2e/TestBundleBuilder.java",),
Expand Down Expand Up @@ -2081,6 +2108,11 @@ def test_java_sdk_conformance_hook_runs_for_serializer_changes(files: tuple[str,
True,
id="skipped when only the docs toolchain's lock file changes",
),
pytest.param(
("ts-sdk/docs/typedoc.config.mjs",),
True,
id="skipped when only the docs toolchain's config changes",
),
pytest.param(
("ts-sdk/api-docs/dag-authoring-api.ts",),
True,
Expand Down
Loading