From 998ef5f7f6234f7e9a51d889261130570ce78367 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:14:12 +0100 Subject: [PATCH 1/3] ci: add GitHub Actions workflow for typecheck, format, and Python sync Runs on every push to main and every pull request: - TypeScript typecheck across all recipes (pnpm typecheck) - Prettier format check (pnpm format:check) - Python uv sync for all 10 Python recipes (matrix, fail-fast: false) Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..12979ac --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,80 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + # ── TypeScript: typecheck all recipes ───────────────────────────────────── + typecheck: + name: TypeScript typecheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: "10.9.0" + + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - run: pnpm typecheck + + # ── Prettier: check formatting ───────────────────────────────────────────── + format: + name: Format check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: "10.9.0" + + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - run: pnpm format:check + + # ── Python: resolve dependencies for every recipe ───────────────────────── + python-sync: + name: Python sync (${{ matrix.recipe }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + recipe: + - recipes/text-to-speech/python/quickstart + - recipes/text-to-speech/python/quickstart-rest + - recipes/text-to-speech/python/streaming + - recipes/text-to-speech/python/ssml-emotion + - recipes/text-to-speech/python/speech-marks + - recipes/text-to-speech/python/voice-cloning + - recipes/voice-agents/python/quickstart-rest + - recipes/voice-agents/python/manage-agents-rest + - recipes/voice-agents/python/conversation-transcript-rest + - recipes/voice-agents/python/realtime-conversation + steps: + - uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v6 + with: + version: "latest" + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Sync ${{ matrix.recipe }} + run: uv sync + working-directory: ${{ matrix.recipe }} From 76a1b58766497e68d54583564126984e44d3a699 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:15:20 +0100 Subject: [PATCH 2/3] ci: use dynamic Python recipe discovery Replaces the hardcoded matrix with a discover step that finds all pyproject.toml files so new recipes are automatically included in CI without manual updates to the workflow. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12979ac..c8cf291 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: pull_request: jobs: - # ── TypeScript: typecheck all recipes ───────────────────────────────────── + # ── TypeScript: typecheck all workspace recipes ──────────────────────────── typecheck: name: TypeScript typecheck runs-on: ubuntu-latest @@ -46,24 +46,29 @@ jobs: - run: pnpm format:check - # ── Python: resolve dependencies for every recipe ───────────────────────── + # ── Python: discover all recipes and resolve dependencies ───────────────── + discover-python: + name: Discover Python recipes + runs-on: ubuntu-latest + outputs: + recipes: ${{ steps.list.outputs.recipes }} + steps: + - uses: actions/checkout@v4 + + - id: list + shell: bash + run: | + recipes=$(find recipes -name "pyproject.toml" -exec dirname {} \; | sort | jq -R -s -c 'split("\n") | map(select(length > 0))') + echo "recipes=$recipes" >> "$GITHUB_OUTPUT" + python-sync: name: Python sync (${{ matrix.recipe }}) + needs: discover-python runs-on: ubuntu-latest strategy: fail-fast: false matrix: - recipe: - - recipes/text-to-speech/python/quickstart - - recipes/text-to-speech/python/quickstart-rest - - recipes/text-to-speech/python/streaming - - recipes/text-to-speech/python/ssml-emotion - - recipes/text-to-speech/python/speech-marks - - recipes/text-to-speech/python/voice-cloning - - recipes/voice-agents/python/quickstart-rest - - recipes/voice-agents/python/manage-agents-rest - - recipes/voice-agents/python/conversation-transcript-rest - - recipes/voice-agents/python/realtime-conversation + recipe: ${{ fromJSON(needs.discover-python.outputs.recipes) }} steps: - uses: actions/checkout@v4 From d030593b476391dedd0e7c64904a7fcc40986405 Mon Sep 17 00:00:00 2001 From: luke-speechify <289678208+luke-speechify@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:17:11 +0100 Subject: [PATCH 3/3] fix: use pnpm run --if-present for typecheck pnpm exec does not support --if-present; use pnpm run --if-present so the recursive typecheck skips packages that don't declare the script. Co-Authored-By: Claude Sonnet 4.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d592a5..7e39b42 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "format": "prettier --write \"**/*.{ts,tsx,js,json,md,yaml,yml}\"", "format:check": "prettier --check \"**/*.{ts,tsx,js,json,md,yaml,yml}\"", - "typecheck": "pnpm -r --if-present exec tsc --noEmit" + "typecheck": "pnpm -r run --if-present typecheck" }, "devDependencies": { "prettier": "^3.4.2"