@@ -26,27 +26,25 @@ jobs:
2626 with :
2727 fetch-depth : 0
2828
29- - name : Set up Python ${{ matrix.python-version }}
30- uses : actions /setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
29+ - name : Set up uv and Python ${{ matrix.python-version }}
30+ uses : astral-sh /setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
3131 with :
32+ version : " 0.7.7"
3233 python-version : ${{ matrix.python-version }}
33- cache : " pip"
34- cache-dependency-path : |
35- **/pyproject.toml
36- **/requirements*.txt
37- **/test-requirements*.txt
34+ enable-cache : true
35+ cache-dependency-glob : " **/pyproject.toml"
3836
3937 - name : Install dependencies
4038 run : |
41- pip install -r test-requirements.txt --upgrade pip
42- pip install "urllib3==${{ matrix.urllib3-version }}"
39+ uv sync
40+ uv pip install "urllib3==${{ matrix.urllib3-version }}"
4341
4442 - if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
4543 name : Run `ruff`
46- run : ruff check
44+ run : uv run ruff check
4745
4846 - name : Run tests and collect coverage
49- run : pytest --cov-fail-under 60 --cov openfga_sdk
47+ run : uv run pytest --cov-fail-under 60 --cov openfga_sdk
5048
5149 - if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
5250 name : Upload coverage to Codecov
@@ -69,23 +67,19 @@ jobs:
6967 with :
7068 fetch-depth : 0
7169
72- - name : Set up Python
73- uses : actions /setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
70+ - name : Set up uv and Python
71+ uses : astral-sh /setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
7472 with :
73+ version : " 0.7.7"
7574 python-version : " 3.10"
76- cache : " pip"
77- cache-dependency-path : |
78- **/pyproject.toml
79- **/requirements*.txt
80- **/test-requirements*.txt
75+ enable-cache : true
76+ cache-dependency-glob : " **/pyproject.toml"
8177
8278 - name : Install dependencies
83- run : pip install -r test-requirements.txt --upgrade pip
79+ run : uv sync
8480
8581 - name : Build package
86- run : |
87- pip install setuptools wheel
88- python setup.py sdist bdist_wheel
82+ run : uv build
8983
9084 - name : Publish package
9185 uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
0 commit comments