1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - uses : actions/checkout@v3
15- - uses : actions/setup-python@v4
16- - uses : pre-commit/action@v3.0.0
14+ - uses : actions/checkout@v3
15+ - uses : actions/setup-python@v4
16+ - uses : pre-commit/action@v3.0.0
1717
1818 unittest :
1919 runs-on : ubuntu-latest
@@ -23,29 +23,17 @@ jobs:
2323 python-version : ["3.10", "3.11"]
2424
2525 steps :
26- - uses : actions/checkout@v3
27- - name : Set up Python ${{ matrix.python-version }}
28- uses : actions/setup-python@v3
29- with :
30- python-version : ${{ matrix.python-version }}
31- - name : Install poetry
32- run : |
33- pip install --upgrade pip
34- pip install poetry
35- - name : Setup a local virtual environment (if no poetry.toml file)
36- run : |
37- poetry config virtualenvs.create true --local
38- poetry config virtualenvs.in-project true --local
39- - name : Define a cache for the virtual environment based on the dependencies lock file
40- uses : actions/cache@v3
41- with :
42- path : ./.venv
43- key : venv-${{ hashFiles('poetry.lock') }}
44- - name : Set up Python environment
45- run : |
46- poetry install --with test
47- - name : Run Tests
48- run : poetry run pytest --junit-xml=testresults/test-client.xml
26+ - uses : actions/checkout@v3
27+ - name : Set up Python ${{ matrix.python-version }}
28+ uses : actions/setup-python@v3
29+ with :
30+ python-version : ${{ matrix.python-version }}
31+ - name : Install uv
32+ uses : astral-sh/setup-uv@v3
33+ - name : Set up Python environment
34+ run : uv sync --group test
35+ - name : Run Tests
36+ run : uv run pytest --junit-xml=testresults/test-client.xml
4937
5038 # ---- Publish ----
5139 build-and-publish :
@@ -61,17 +49,18 @@ jobs:
6149 with :
6250 python-version : 3.11
6351
64- - name : Install dependencies
65- run : |
66- python -m pip install --upgrade pip
67- pip install poetry
52+ - name : Install uv
53+ uses : astral-sh/setup-uv@v3
6854
69- - name : Build Package
55+ - name : Set version and build
7056 run : |
71- poetry config pypi-token.pypi ${{secrets.PYPI_LIB_TOKEN}}
72- poetry version ${{ github.ref_name }}
73- poetry build
74- poetry publish
57+ uv version ${{ github.ref_name }}
58+ uv build
59+
60+ - name : Publish to PyPI
61+ env :
62+ UV_PUBLISH_TOKEN : ${{secrets.PYPI_LIB_TOKEN}}
63+ run : uv publish
7564
7665 publish-docs :
7766 runs-on : ubuntu-latest
@@ -85,10 +74,10 @@ jobs:
8574 - uses : actions/setup-python@v5
8675 with :
8776 python-version : 3.x
88- - name : Install Poetry
89- run : pip install poetry
77+ - name : Install uv
78+ uses : astral-sh/setup-uv@v3
9079 - name : Install dependencies for docs
91- run : poetry install --with dev
80+ run : uv sync --group dev
9281 - run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
9382 - uses : actions/cache@v4
9483 with :
9786 restore-keys : |
9887 mkdocs-material-
9988 - name : Deploy docs
100- run : poetry run mkdocs gh-deploy --force
89+ run : uv run mkdocs gh-deploy --force
0 commit comments