@@ -26,27 +26,25 @@ jobs:
26
26
with :
27
27
fetch-depth : 0
28
28
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
31
31
with :
32
+ version : " 0.7.7"
32
33
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"
38
36
39
37
- name : Install dependencies
40
38
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 }}"
43
41
44
42
- if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
45
43
name : Run `ruff`
46
- run : ruff check
44
+ run : uv run ruff check
47
45
48
46
- 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
50
48
51
49
- if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
52
50
name : Upload coverage to Codecov
@@ -69,23 +67,19 @@ jobs:
69
67
with :
70
68
fetch-depth : 0
71
69
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
74
72
with :
73
+ version : " 0.7.7"
75
74
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"
81
77
82
78
- name : Install dependencies
83
- run : pip install -r test-requirements.txt --upgrade pip
79
+ run : uv sync
84
80
85
81
- name : Build package
86
- run : |
87
- pip install setuptools wheel
88
- python setup.py sdist bdist_wheel
82
+ run : uv build
89
83
90
84
- name : Publish package
91
85
uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
0 commit comments