diff --git a/.github/workflows/ci-extraction-service.yml b/.github/workflows/ci-extraction-service.yml index 5cd263b9..7da8b38a 100644 --- a/.github/workflows/ci-extraction-service.yml +++ b/.github/workflows/ci-extraction-service.yml @@ -22,29 +22,14 @@ on: jobs: typescript: name: TypeScript (build + test) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - with: - version: 10 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: pnpm - - - run: pnpm install --frozen-lockfile - - - name: Build packages + service - run: pnpm -r --filter @lysnrai/extraction-service... build - - - name: Run tests - run: pnpm --filter @lysnrai/extraction-service test - - - name: Type check - run: pnpm --filter @lysnrai/extraction-service exec tsc --noEmit + uses: ./.github/workflows/reusable-pnpm-workspace.yml + with: + node-version: '22' + pnpm-version: '10' + command: | + pnpm -r --filter @lysnrai/extraction-service... build + pnpm --filter @lysnrai/extraction-service test + pnpm --filter @lysnrai/extraction-service exec tsc --noEmit python: name: Python sidecar (lint + test) diff --git a/.github/workflows/reusable-pnpm-workspace.yml b/.github/workflows/reusable-pnpm-workspace.yml new file mode 100644 index 00000000..e68b6f03 --- /dev/null +++ b/.github/workflows/reusable-pnpm-workspace.yml @@ -0,0 +1,43 @@ +name: Reusable — pnpm Workspace + +on: + workflow_call: + inputs: + node-version: + type: string + default: '20' + pnpm-version: + type: string + default: '10' + command: + type: string + required: true + timeout-minutes: + type: number + default: 10 + +jobs: + run: + name: Run + runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeout-minutes }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ inputs.pnpm-version }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run command + run: ${{ inputs.command }} diff --git a/docs/workstreams/ALL_OTHER_WORKSTREAMS_REMAINING.md b/docs/workstreams/ALL_OTHER_WORKSTREAMS_REMAINING.md index 1242a3b0..4a27195e 100644 --- a/docs/workstreams/ALL_OTHER_WORKSTREAMS_REMAINING.md +++ b/docs/workstreams/ALL_OTHER_WORKSTREAMS_REMAINING.md @@ -21,6 +21,7 @@ - 2026-02-15: Removed MindLyst KMP build verification from this non-mobile checklist (tracked in `docs/workstreams/MOBILE_WORKSTREAM_REMAINING.md`) - 2026-02-15: Verified `extraction-service` Dockerfile build (`docker compose build extraction-service`) - 2026-02-15: Added Changesets (`.changeset/`) for versioning + changelog automation (**7.2**) +- 2026-02-15: Added reusable GitHub Actions workflow template (`.github/workflows/reusable-pnpm-workspace.yml`) (**7.3**) ## Prereqs (Local) @@ -80,7 +81,7 @@ Publishing + repo hygiene - [ ] **7.1** Publish `@bytelyst/*` packages to GitHub Packages (private npm registry) - [x] **7.2** Add Changesets for automated version management and changelogs -- [ ] **7.3** Create reusable GitHub Actions workflow templates for service CI +- [x] **7.3** Create reusable GitHub Actions workflow templates for service CI - [x] **7.4** Add `@bytelyst/blob` package (extract blob storage client + SAS generation) - [x] **7.5** Add `@bytelyst/monitoring` package (health check aggregator) - [ ] **7.7** Evaluate Python shared package for `cosmos_client.py` + `blob_client.py` if MindLyst adds Python backend