From 33d438a3c4dcfab602bfde12f44ebcee691a1467 Mon Sep 17 00:00:00 2001 From: tercel Date: Tue, 1 Dec 2026 08:59:07 +0800 Subject: [PATCH] chore(ci): scope Core workflows by SDK Signed-off-by: tercel --- .github/workflows/deploy-docs.yml | 14 +- .github/workflows/package-python.yml | 59 +++++++ .github/workflows/package-rust.yml | 112 +++++++++++++ .github/workflows/package-typescript.yml | 73 +++++++++ .github/workflows/packages.yml | 194 +---------------------- .github/workflows/sdk-python.yml | 10 +- .github/workflows/sdk-rust.yml | 10 +- .github/workflows/sdk-typescript.yml | 6 + CONTRIBUTING.md | 4 +- conformance/extract_doc_examples.py | 1 + 10 files changed, 285 insertions(+), 198 deletions(-) create mode 100644 .github/workflows/package-python.yml create mode 100644 .github/workflows/package-rust.yml create mode 100644 .github/workflows/package-typescript.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 2a9f764a..4e367da6 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -4,9 +4,19 @@ on: push: branches: - main + paths: &docs-paths + - 'docs/**' + - 'llms.txt' + - 'mkdocs.yml' + - 'schemas/module-schema.schema.json' + - 'scripts/gen_llms_full.py' + - 'scripts/mkdocs_schemas.py' + - '.github/workflows/deploy-docs.yml' pull_request: branches: - main + paths: *docs-paths + workflow_dispatch: permissions: contents: read @@ -37,12 +47,12 @@ jobs: - run: mkdocs build --strict - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 - if: github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' with: path: site deploy: - if: github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' needs: build runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/package-python.yml b/.github/workflows/package-python.yml new file mode 100644 index 00000000..b0dec484 --- /dev/null +++ b/.github/workflows/package-python.yml @@ -0,0 +1,59 @@ +name: Core distribution verification (python) + +on: + pull_request: + paths: &package-paths + - 'python/**' + - 'docs/getting-started.md' + - 'docs/features/streaming.md' + - 'docs/features/module-interface.md' + - 'docs/features/context-object.md' + - 'conformance/extract_doc_examples.py' + - '.github/workflows/package-python.yml' + push: + branches: [main] + paths: *package-paths + workflow_call: + +permissions: + contents: read + +jobs: + python: + runs-on: ubuntu-latest + defaults: + run: + working-directory: python + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.11' + - name: Build wheel and sdist + run: | + python -m pip install build + python -m build + - name: Verify installed wheel + shell: bash + run: | + wheel=( "$PWD"/dist/*.whl ) + temporary=$(mktemp -d) + python -m venv "$temporary/venv" + cd "$temporary" + "$temporary/venv/bin/python" -m pip install "${wheel[0]}" + "$temporary/venv/bin/python" -m pip check + "$temporary/venv/bin/python" -c 'from apcore import APCore, Registry; from importlib.util import find_spec; assert all(find_spec(name) is None for name in ("yaml", "watchdog", "aiohttp", "opentelemetry"))' + "$temporary/venv/bin/python" -c 'from importlib.resources import files; assert files("apcore").joinpath("py.typed").is_file(), "installed wheel is missing apcore/py.typed"' + python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" python "$temporary" + (cd quick-start && "$temporary/venv/bin/python" -I example.py) + (cd typed-module && "$temporary/venv/bin/python" -I example.py) + (cd invocation-budget && "$temporary/venv/bin/python" -I example.py) + python -m venv "$temporary/full" + "$temporary/full/bin/python" -m pip install "${wheel[0]}[all]" + "$temporary/full/bin/python" -m pip check + "$temporary/full/bin/python" -c 'from apcore.full import APCore, Config; from apcore.events import SubscriberRegistry; assert APCore(config=Config.from_defaults()).registry is not None' + (cd governed-stream && "$temporary/full/bin/python" -I example.py) + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: core-python-distributions + path: python/dist/ diff --git a/.github/workflows/package-rust.yml b/.github/workflows/package-rust.yml new file mode 100644 index 00000000..6f2d4702 --- /dev/null +++ b/.github/workflows/package-rust.yml @@ -0,0 +1,112 @@ +name: Core distribution verification (rust) + +on: + pull_request: + paths: &package-paths + - 'rust/**' + - 'docs/getting-started.md' + - 'docs/features/streaming.md' + - 'docs/features/module-interface.md' + - 'docs/features/context-object.md' + - 'conformance/extract_doc_examples.py' + - '.github/workflows/package-rust.yml' + push: + branches: [main] + paths: *package-paths + workflow_call: + +permissions: + contents: read + +jobs: + rust: + runs-on: ubuntu-latest + defaults: + run: + working-directory: rust + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc + with: + toolchain: 1.86.0 + - name: Package the macro and its SDK + shell: bash + run: | + # Package both workspace crates together to stage the macro in + # Cargo's temporary registry. Keep the published dependency and its + # checksum in the SDK archive's lockfile. + rustup toolchain install 1.100.0 --profile minimal + cargo +1.100.0 package --locked --all-features -p apcore -p apcore-macros + python3 - <<'PYTHON' + import hashlib + from pathlib import Path + import tarfile + import tomllib + + sdk, = Path("target/package").glob("apcore-[0-9]*.crate") + macros, = Path("target/package").glob("apcore-macros-[0-9]*.crate") + with tarfile.open(sdk) as archive: + lockfile = archive.extractfile(f"{sdk.stem}/Cargo.lock") + assert lockfile is not None + lock = tomllib.loads(lockfile.read().decode("utf-8")) + macro, = (package for package in lock["package"] if package["name"] == "apcore-macros") + assert macro["source"] == "registry+https://github.com/rust-lang/crates.io-index" + assert macro["checksum"] == hashlib.sha256(macros.read_bytes()).hexdigest() + PYTHON + - name: Run downstream examples against the packaged crate + shell: bash + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback + run: | + sdk=( "$PWD"/target/package/apcore-[0-9]*.crate ) + macro=( "$PWD"/target/package/apcore-macros-[0-9]*.crate ) + temporary=$(mktemp -d) + cd "$temporary" + mkdir sdk macros + tar -xzf "${sdk[0]}" --strip-components=1 -C sdk + tar -xzf "${macro[0]}" --strip-components=1 -C macros + cp sdk/Cargo.lock Cargo.lock + python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" rust "$temporary" + cat > Cargo.toml <<'EOF' + [package] + name = "apcore-doc-examples" + version = "0.0.0" + edition = "2021" + rust-version = "1.86" + + [dependencies] + apcore = { path = "sdk", features = ["config", "events", "macros"] } + async-trait = "0.1.92" + futures-util = "0.3" + schemars = "0.8" + serde = { version = "1", features = ["derive"] } + serde_json = "1" + tokio = { version = "1", features = ["macros", "rt-multi-thread"] } + + [patch.crates-io] + apcore-macros = { path = "macros" } + + [[bin]] + name = "quick-start" + path = "quick-start/example.rs" + + [[bin]] + name = "governed-stream" + path = "governed-stream/example.rs" + + [[bin]] + name = "typed-module" + path = "typed-module/example.rs" + + [[bin]] + name = "invocation-budget" + path = "invocation-budget/example.rs" + EOF + (cd quick-start && cargo run --quiet --manifest-path ../Cargo.toml --bin quick-start) + (cd governed-stream && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin governed-stream) + (cd typed-module && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin typed-module) + (cd invocation-budget && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin invocation-budget) + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: core-rust-distribution + path: rust/target/package/*.crate diff --git a/.github/workflows/package-typescript.yml b/.github/workflows/package-typescript.yml new file mode 100644 index 00000000..e90afabb --- /dev/null +++ b/.github/workflows/package-typescript.yml @@ -0,0 +1,73 @@ +name: Core distribution verification (typescript) + +on: + pull_request: + paths: &package-paths + - 'typescript/**' + - 'docs/getting-started.md' + - 'docs/features/streaming.md' + - 'docs/features/module-interface.md' + - 'docs/features/context-object.md' + - 'conformance/extract_doc_examples.py' + - '.github/workflows/package-typescript.yml' + push: + branches: [main] + paths: *package-paths + workflow_call: + +permissions: + contents: read + +jobs: + typescript: + runs-on: ubuntu-latest + defaults: + run: + working-directory: typescript + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '22' + - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + with: + version: '10.30.1' + - run: pnpm install --frozen-lockfile + - run: pnpm build + - name: Pack the distribution + run: | + mkdir -p "$GITHUB_WORKSPACE/dist-archives" + pnpm pack --pack-destination "$GITHUB_WORKSPACE/dist-archives" + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '20.0.0' + - name: Run installed package checks on the Node floor + shell: bash + run: | + temporary=$(mktemp -d) + archive=( "$GITHUB_WORKSPACE"/dist-archives/*.tgz ) + cd "$temporary" + npm init -y + npm pkg set type=module + npm install --ignore-scripts "${archive[0]}" typescript@5.5.4 @types/node@20 zod@4 + node --input-type=module -e 'import {APCore} from "apcore-js"; import "apcore-js/context-keys"; if (!APCore) throw new Error("APCore is missing");' + cat > verify-browser.mjs <<'EOF' + const url = await import.meta.resolve("apcore-js"); + if (!url.endsWith("/dist/index.js")) throw new Error("browser entry did not resolve to the portable root"); + const core = await import("apcore-js"); + if (!core.APCore || "Config" in core) throw new Error("invalid Core Profile exports"); + EOF + node --conditions=browser --experimental-import-meta-resolve verify-browser.mjs + node --input-type=module -e 'import {accessSync} from "node:fs"; for (const entry of ["index", "core", "full", "config-entry", "discovery", "events/entry", "context-keys"]) accessSync(`node_modules/apcore-js/dist/${entry}.d.ts`);' + node --input-type=module -e 'import {APCore} from "apcore-js/full"; import {Config} from "apcore-js/config"; import {createFilesystemDiscoveryPlugin} from "apcore-js/discovery"; if (!new APCore({config: new Config(), plugins: [createFilesystemDiscoveryPlugin()]}).registry) throw new Error("invalid full assembly");' + python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" typescript "$temporary" + ./node_modules/.bin/tsc --strict --module NodeNext --target ES2022 --rootDir . --outDir compiled \ + quick-start/example.ts governed-stream/example.ts typed-module/example.ts invocation-budget/example.ts + (cd quick-start && node ../compiled/quick-start/example.js) + (cd governed-stream && node ../compiled/governed-stream/example.js) + (cd typed-module && node ../compiled/typed-module/example.js) + (cd invocation-budget && node ../compiled/invocation-budget/example.js) + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + with: + name: core-npm-distribution + path: dist-archives/*.tgz diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 96b1c751..7d615335 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -1,17 +1,6 @@ name: Core distribution verification on: - pull_request: - paths: &sdk-paths - - 'python/**' - - 'rust/**' - - 'typescript/**' - - 'docs/**' - - 'conformance/extract_doc_examples.py' - - '.github/workflows/packages.yml' - push: - branches: [main] - paths: *sdk-paths workflow_dispatch: permissions: @@ -19,185 +8,8 @@ permissions: jobs: python: - runs-on: ubuntu-latest - defaults: - run: - working-directory: python - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 - with: - python-version: '3.11' - - name: Build wheel and sdist - run: | - python -m pip install build - python -m build - - name: Verify installed wheel - shell: bash - run: | - wheel=( "$PWD"/dist/*.whl ) - temporary=$(mktemp -d) - python -m venv "$temporary/venv" - cd "$temporary" - "$temporary/venv/bin/python" -m pip install "${wheel[0]}" - "$temporary/venv/bin/python" -m pip check - "$temporary/venv/bin/python" -c 'from apcore import APCore, Registry; from importlib.util import find_spec; assert all(find_spec(name) is None for name in ("yaml", "watchdog", "aiohttp", "opentelemetry"))' - "$temporary/venv/bin/python" -c 'from importlib.resources import files; assert files("apcore").joinpath("py.typed").is_file(), "installed wheel is missing apcore/py.typed"' - python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" python "$temporary" - (cd quick-start && "$temporary/venv/bin/python" -I example.py) - (cd typed-module && "$temporary/venv/bin/python" -I example.py) - (cd invocation-budget && "$temporary/venv/bin/python" -I example.py) - python -m venv "$temporary/full" - "$temporary/full/bin/python" -m pip install "${wheel[0]}[all]" - "$temporary/full/bin/python" -m pip check - "$temporary/full/bin/python" -c 'from apcore.full import APCore, Config; from apcore.events import SubscriberRegistry; assert APCore(config=Config.from_defaults()).registry is not None' - (cd governed-stream && "$temporary/full/bin/python" -I example.py) - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: core-python-distributions - path: python/dist/ - + uses: ./.github/workflows/package-python.yml rust: - runs-on: ubuntu-latest - defaults: - run: - working-directory: rust - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dtolnay/rust-toolchain@df2a88e9fe4098bad09cb42c3dec7187f15861fc - with: - toolchain: 1.86.0 - - name: Package the macro and its SDK - shell: bash - run: | - # Package both workspace crates together to stage the macro in - # Cargo's temporary registry. Keep the published dependency and its - # checksum in the SDK archive's lockfile. - rustup toolchain install 1.100.0 --profile minimal - cargo +1.100.0 package --locked --all-features -p apcore -p apcore-macros - python3 - <<'PYTHON' - import hashlib - from pathlib import Path - import tarfile - import tomllib - - sdk, = Path("target/package").glob("apcore-[0-9]*.crate") - macros, = Path("target/package").glob("apcore-macros-[0-9]*.crate") - with tarfile.open(sdk) as archive: - lockfile = archive.extractfile(f"{sdk.stem}/Cargo.lock") - assert lockfile is not None - lock = tomllib.loads(lockfile.read().decode("utf-8")) - macro, = (package for package in lock["package"] if package["name"] == "apcore-macros") - assert macro["source"] == "registry+https://github.com/rust-lang/crates.io-index" - assert macro["checksum"] == hashlib.sha256(macros.read_bytes()).hexdigest() - PYTHON - - name: Run downstream examples against the packaged crate - shell: bash - env: - CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback - run: | - sdk=( "$PWD"/target/package/apcore-[0-9]*.crate ) - macro=( "$PWD"/target/package/apcore-macros-[0-9]*.crate ) - temporary=$(mktemp -d) - cd "$temporary" - mkdir sdk macros - tar -xzf "${sdk[0]}" --strip-components=1 -C sdk - tar -xzf "${macro[0]}" --strip-components=1 -C macros - cp sdk/Cargo.lock Cargo.lock - python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" rust "$temporary" - cat > Cargo.toml <<'EOF' - [package] - name = "apcore-doc-examples" - version = "0.0.0" - edition = "2021" - rust-version = "1.86" - - [dependencies] - apcore = { path = "sdk", features = ["config", "events", "macros"] } - async-trait = "0.1.92" - futures-util = "0.3" - schemars = "0.8" - serde = { version = "1", features = ["derive"] } - serde_json = "1" - tokio = { version = "1", features = ["macros", "rt-multi-thread"] } - - [patch.crates-io] - apcore-macros = { path = "macros" } - - [[bin]] - name = "quick-start" - path = "quick-start/example.rs" - - [[bin]] - name = "governed-stream" - path = "governed-stream/example.rs" - - [[bin]] - name = "typed-module" - path = "typed-module/example.rs" - - [[bin]] - name = "invocation-budget" - path = "invocation-budget/example.rs" - EOF - (cd quick-start && cargo run --quiet --manifest-path ../Cargo.toml --bin quick-start) - (cd governed-stream && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin governed-stream) - (cd typed-module && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin typed-module) - (cd invocation-budget && cargo run --locked --quiet --manifest-path ../Cargo.toml --bin invocation-budget) - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: core-rust-distribution - path: rust/target/package/*.crate - + uses: ./.github/workflows/package-rust.yml typescript: - runs-on: ubuntu-latest - defaults: - run: - working-directory: typescript - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 - with: - node-version: '22' - - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - with: - version: '10.30.1' - - run: pnpm install --frozen-lockfile - - run: pnpm build - - name: Pack the distribution - run: | - mkdir -p "$GITHUB_WORKSPACE/dist-archives" - pnpm pack --pack-destination "$GITHUB_WORKSPACE/dist-archives" - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 - with: - node-version: '20.0.0' - - name: Run installed package checks on the Node floor - shell: bash - run: | - temporary=$(mktemp -d) - archive=( "$GITHUB_WORKSPACE"/dist-archives/*.tgz ) - cd "$temporary" - npm init -y - npm pkg set type=module - npm install --ignore-scripts "${archive[0]}" typescript@5.5.4 @types/node@20 zod@4 - node --input-type=module -e 'import {APCore} from "apcore-js"; import "apcore-js/context-keys"; if (!APCore) throw new Error("APCore is missing");' - cat > verify-browser.mjs <<'EOF' - const url = await import.meta.resolve("apcore-js"); - if (!url.endsWith("/dist/index.js")) throw new Error("browser entry did not resolve to the portable root"); - const core = await import("apcore-js"); - if (!core.APCore || "Config" in core) throw new Error("invalid Core Profile exports"); - EOF - node --conditions=browser --experimental-import-meta-resolve verify-browser.mjs - node --input-type=module -e 'import {accessSync} from "node:fs"; for (const entry of ["index", "core", "full", "config-entry", "discovery", "events/entry", "context-keys"]) accessSync(`node_modules/apcore-js/dist/${entry}.d.ts`);' - node --input-type=module -e 'import {APCore} from "apcore-js/full"; import {Config} from "apcore-js/config"; import {createFilesystemDiscoveryPlugin} from "apcore-js/discovery"; if (!new APCore({config: new Config(), plugins: [createFilesystemDiscoveryPlugin()]}).registry) throw new Error("invalid full assembly");' - python3 "$GITHUB_WORKSPACE/conformance/extract_doc_examples.py" typescript "$temporary" - ./node_modules/.bin/tsc --strict --module NodeNext --target ES2022 --rootDir . --outDir compiled \ - quick-start/example.ts governed-stream/example.ts typed-module/example.ts invocation-budget/example.ts - (cd quick-start && node ../compiled/quick-start/example.js) - (cd governed-stream && node ../compiled/governed-stream/example.js) - (cd typed-module && node ../compiled/typed-module/example.js) - (cd invocation-budget && node ../compiled/invocation-budget/example.js) - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: core-npm-distribution - path: dist-archives/*.tgz + uses: ./.github/workflows/package-typescript.yml diff --git a/.github/workflows/sdk-python.yml b/.github/workflows/sdk-python.yml index df6b5ccb..e5fd55e5 100644 --- a/.github/workflows/sdk-python.yml +++ b/.github/workflows/sdk-python.yml @@ -5,9 +5,15 @@ permissions: on: push: - branches: [ "main" ] + branches: [main] + paths: &sdk-paths + - 'python/**' + - 'conformance/**' + - 'schemas/**' + - '.github/workflows/sdk-python.yml' pull_request: - branches: [ "main" ] + branches: [main] + paths: *sdk-paths jobs: test: diff --git a/.github/workflows/sdk-rust.yml b/.github/workflows/sdk-rust.yml index bfb01316..5178346c 100644 --- a/.github/workflows/sdk-rust.yml +++ b/.github/workflows/sdk-rust.yml @@ -5,9 +5,15 @@ permissions: on: push: - branches: ["main"] + branches: [main] + paths: &sdk-paths + - 'rust/**' + - 'conformance/**' + - 'schemas/**' + - '.github/workflows/sdk-rust.yml' pull_request: - branches: ["main"] + branches: [main] + paths: *sdk-paths jobs: test: diff --git a/.github/workflows/sdk-typescript.yml b/.github/workflows/sdk-typescript.yml index df2ee05c..cc5329ee 100644 --- a/.github/workflows/sdk-typescript.yml +++ b/.github/workflows/sdk-typescript.yml @@ -6,8 +6,14 @@ permissions: on: push: branches: [main] + paths: &sdk-paths + - 'typescript/**' + - 'conformance/**' + - 'schemas/**' + - '.github/workflows/sdk-typescript.yml' pull_request: branches: [main] + paths: *sdk-paths jobs: build-and-test: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44ae5cbd..ae013085 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,9 @@ Clone this repository once. Each SDK has its own setup and test commands. Run the commands from the corresponding SDK directory. The test suites read the shared fixtures in `conformance/` at the repository root. -The SDK workflows run the Python and Rust suites on their declared minimum versions as well as the primary versions. The TypeScript source suite uses the development Node toolchain, and the [distribution workflow](.github/workflows/packages.yml) installs the packed package on the minimum Node version. The distribution workflow extracts the marked Quick Start and governed-stream code blocks from the docs and runs them against all three installed SDKs. Update the code blocks directly when their public API calls change. +Each SDK workflow runs for changes to its language directory or workflow file. Changes under `conformance/` or `schemas/` run all three SDK test suites. Python and Rust are tested on their declared minimum versions as well as the primary versions. The TypeScript suite uses the development Node toolchain. + +Each SDK has a distribution workflow that builds its package and runs the marked documentation examples against the installed package. The TypeScript distribution workflow uses the minimum supported Node version for the installed-package checks. Changes to the executable example pages or their extractor run all three distribution checks. You can also run all three manually via [Core distribution verification](.github/workflows/packages.yml). Update the marked examples directly when their public API calls change. ## Pull Request Process diff --git a/conformance/extract_doc_examples.py b/conformance/extract_doc_examples.py index f95e0377..2108c676 100644 --- a/conformance/extract_doc_examples.py +++ b/conformance/extract_doc_examples.py @@ -31,6 +31,7 @@ def main() -> None: parser.add_argument("destination", type=Path) args = parser.parse_args() ext = EXTENSIONS[args.language] + # Keep these source paths in sync with the three package-*.yml workflow filters. sources = ( ("docs/getting-started.md", "quick-start", args.language, f"quick-start/example.{ext}"), (STREAM_GUIDE, "governed-stream", args.language, f"governed-stream/example.{ext}"),