Skip to content

Commit b469188

Browse files
author
Andrew Brookins
committed
Dedupe lints/tests
1 parent 5f94748 commit b469188

File tree

3 files changed

+28
-63
lines changed

3 files changed

+28
-63
lines changed

.github/workflows/agent-memory-client.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,9 @@ jobs:
3131
working-directory: agent-memory-client
3232
run: uv sync --extra dev
3333

34-
- name: Lint with Ruff
35-
working-directory: agent-memory-client
36-
run: uv run ruff check agent_memory_client
37-
38-
- name: Check formatting with Ruff formatter
39-
working-directory: agent-memory-client
40-
run: uv run ruff format --check agent_memory_client
41-
42-
- name: Type check with mypy
43-
working-directory: agent-memory-client
44-
run: uv run mypy agent_memory_client
34+
- name: Run pre-commit
35+
run: |
36+
uv run pre-commit run --all-files
4537
4638
- name: Run tests
4739
working-directory: agent-memory-client

.github/workflows/agent-memory-server.yml

Lines changed: 22 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
branches: [main]
1010

1111
jobs:
12-
test:
13-
name: Test and build (Python 3.12)
12+
build:
13+
name: Build package
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
@@ -20,56 +20,35 @@ jobs:
2020
with:
2121
python-version: '3.12'
2222

23-
- name: Install uv
24-
uses: astral-sh/setup-uv@v3
25-
26-
- name: Install dependencies
27-
run: uv sync --all-extras
28-
29-
- name: Install agent-memory-client (editable)
30-
run: uv pip install -e ./agent-memory-client
31-
32-
- name: Lint with Ruff
33-
run: uv run ruff check
34-
35-
- name: Check formatting with Ruff formatter
36-
run: uv run ruff format --check
37-
38-
- name: Run tests
39-
run: uv run pytest --run-api-tests
40-
env:
41-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
42-
43-
- name: Build package
23+
- name: Install build tools
4424
run: |
4525
python -m pip install --upgrade pip
4626
pip install build
47-
python -m build
27+
28+
- name: Build package
29+
run: python -m build
30+
31+
- name: Upload dist artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: dist
35+
path: dist/*
4836

4937
publish-testpypi:
5038
name: Publish to TestPyPI
51-
needs: test
39+
needs: build
5240
if: startsWith(github.ref, 'refs/tags/server/') && contains(github.ref, '-test')
5341
runs-on: ubuntu-latest
5442
environment: testpypi
5543
permissions:
5644
id-token: write
5745
contents: read
5846
steps:
59-
- uses: actions/checkout@v4
60-
61-
- name: Set up Python
62-
uses: actions/setup-python@v4
47+
- name: Download dist artifact
48+
uses: actions/download-artifact@v4
6349
with:
64-
python-version: '3.12'
65-
66-
- name: Install build tools
67-
run: |
68-
python -m pip install --upgrade pip
69-
pip install build
70-
71-
- name: Build package
72-
run: python -m build
50+
name: dist
51+
path: dist
7352

7453
- name: Publish package to TestPyPI
7554
uses: pypa/gh-action-pypi-publish@release/v1
@@ -79,28 +58,19 @@ jobs:
7958

8059
publish-pypi:
8160
name: Publish to PyPI
82-
needs: test
61+
needs: build
8362
if: startsWith(github.ref, 'refs/tags/server/') && !contains(github.ref, '-test')
8463
runs-on: ubuntu-latest
8564
environment: pypi
8665
permissions:
8766
id-token: write
8867
contents: read
8968
steps:
90-
- uses: actions/checkout@v4
91-
92-
- name: Set up Python
93-
uses: actions/setup-python@v4
69+
- name: Download dist artifact
70+
uses: actions/download-artifact@v4
9471
with:
95-
python-version: '3.12'
96-
97-
- name: Install build tools
98-
run: |
99-
python -m pip install --upgrade pip
100-
pip install build
101-
102-
- name: Build package
103-
run: python -m build
72+
name: dist
73+
path: dist
10474

10575
- name: Publish package to PyPI
10676
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/python-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Python Tests
33
on:
44
push:
55
branches: [ main ]
6+
tags:
7+
- 'server/v*.*.*'
8+
- 'client/v*.*.*'
69
pull_request:
710
branches: [ main ]
811

0 commit comments

Comments
 (0)