Skip to content

Enhance CI workflow by adding TypeScript SDK build and artifact manag… #5

Enhance CI workflow by adding TypeScript SDK build and artifact manag…

Enhance CI workflow by adding TypeScript SDK build and artifact manag… #5

Workflow file for this run

# CI workflow: lint, build, and test all packages
#
# Triggers:
# - Pull requests to main or develop
# - Pushes to develop
name: CI
on:
pull_request:
branches:
- main
- develop
push:
branches:
- develop
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
# ──────────────────────────────────────────────────────────────────
# Python server (memorylayer-core-python)
# ──────────────────────────────────────────────────────────────────
test-python-server:
name: "Python: memorylayer-server"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev extras
working-directory: memorylayer-core-python
run: pip install -e ".[dev]"
- name: Lint with ruff
working-directory: memorylayer-core-python
run: ruff check .
- name: Check formatting with ruff
working-directory: memorylayer-core-python
run: ruff format --check .
- name: Run tests
working-directory: memorylayer-core-python
run: pytest tests/ -m "not slow and not integration and not llm and not llm_quality" -x
# ──────────────────────────────────────────────────────────────────
# Python SDK (memorylayer-sdk-python)
# ──────────────────────────────────────────────────────────────────
test-python-sdk:
name: "Python: memorylayer-client"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with dev extras
working-directory: memorylayer-sdk-python
run: pip install -e ".[dev]"
- name: Lint with ruff
working-directory: memorylayer-sdk-python
run: ruff check .
- name: Check formatting with ruff
working-directory: memorylayer-sdk-python
run: ruff format --check .
- name: Run tests
working-directory: memorylayer-sdk-python
run: pytest tests/ -x
# ──────────────────────────────────────────────────────────────────
# TypeScript packages
# ──────────────────────────────────────────────────────────────────
build-typescript-sdk:
name: "TypeScript: memorylayer-sdk (build)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
working-directory: memorylayer-sdk-typescript
run: npm ci
- name: Build
working-directory: memorylayer-sdk-typescript
run: npm run build
- name: Upload SDK build artifacts
uses: actions/upload-artifact@v4
with:
name: memorylayer-sdk-dist
path: memorylayer-sdk-typescript/dist/
retention-days: 1
test-typescript:
name: "TypeScript: ${{ matrix.package.name }}"
needs: build-typescript-sdk
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- { dir: memorylayer-sdk-typescript, name: memorylayer-sdk }
- { dir: memorylayer-mcp-typescript, name: memorylayer-mcp-server }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Download SDK build artifacts
uses: actions/download-artifact@v4
with:
name: memorylayer-sdk-dist
path: memorylayer-sdk-typescript/dist/
- name: Install dependencies
working-directory: ${{ matrix.package.dir }}
run: npm ci
- name: Build
working-directory: ${{ matrix.package.dir }}
run: npm run build