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,17 @@ 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 build
58+
59+ - name : Publish to PyPI
60+ env :
61+ UV_PUBLISH_TOKEN : ${{secrets.PYPI_LIB_TOKEN}}
62+ run : uv publish
7563
7664 publish-docs :
7765 runs-on : ubuntu-latest
@@ -84,13 +72,17 @@ jobs:
8472 git config user.email 41898282+github-actions[bot]@users.noreply.github.com
8573 - uses : actions/setup-python@v5
8674 with :
87- python-version : 3.x
75+ python-version : 3.11
76+ - name : Install uv
77+ uses : astral-sh/setup-uv@v3
78+ - name : Install dependencies for docs
79+ run : uv sync
8880 - run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
8981 - uses : actions/cache@v4
9082 with :
9183 key : mkdocs-material-${{ env.cache_id }}
9284 path : .cache
9385 restore-keys : |
9486 mkdocs-material-
95- - run : pip install mkdocs-material
96- - run : mkdocs gh-deploy --force
87+ - name : Deploy docs
88+ run : uv run mkdocs gh-deploy --force
0 commit comments