99 branches : [main]
1010
1111jobs :
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
0 commit comments