Skip to content
Merged
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
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
# ── TypeScript: typecheck all workspace 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: 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: ${{ fromJSON(needs.discover-python.outputs.recipes) }}
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 }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading