-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (115 loc) · 4.55 KB
/
ci.yml
File metadata and controls
141 lines (115 loc) · 4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# 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 and context extras
working-directory: memorylayer-core-python
run: pip install -e ".[dev,context]"
- 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