@@ -28,30 +28,26 @@ jobs:
28
28
with :
29
29
fetch-depth : 0
30
30
31
- - name : Set up Python ${{ matrix.python-version }}
32
- uses : actions /setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6 .0
31
+ - name : Set up uv and Python
32
+ uses : astral-sh /setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7 .0
33
33
with :
34
+ version : " 0.8.17"
35
+ checksum : " 920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203"
34
36
python-version : ${{ matrix.python-version }}
35
- cache : " pip"
36
- cache-dependency-path : |
37
- **/pyproject.toml
37
+ enable-cache : true
38
+ cache-dependency-glob : " **/pyproject.toml"
38
39
39
40
- name : Install dependencies
40
41
run : |
41
- pip install uv
42
- export UV_LINK_MODE=copy && \
43
- uv sync --group dev && \
44
- uv run ruff check --select I --fix . && \
45
- uv run ruff format . && \
46
- uv build
42
+ uv sync
43
+ uv pip install "urllib3==${{ matrix.urllib3-version }}"
44
+
45
+ - if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
46
+ name : Run ` ruff`
47
+ run : uv run ruff check
47
48
48
49
- name : Run tests and collect coverage
49
- run : |
50
- export UV_LINK_MODE=copy && \
51
- uv sync --group dev && \
52
- uv run --with "urllib3==${{ matrix.urllib3-version }}" \
53
- pytest --cov-report term-missing --cov=openfga_sdk --cov-fail-under=60 test/ && \
54
- uv run ruff check .
50
+ run : uv run pytest --cov-fail-under 60 --cov openfga_sdk
55
51
56
52
- if : matrix.python-version == '3.10' && matrix.urllib3-version == '1.26.19'
57
53
name : Upload coverage to Codecov
@@ -74,23 +70,20 @@ jobs:
74
70
with :
75
71
fetch-depth : 0
76
72
77
- - name : Set up Python
78
- uses : actions /setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6 .0
73
+ - name : Set up uv and Python
74
+ uses : astral-sh /setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7 .0
79
75
with :
76
+ version : " 0.8.17"
77
+ checksum : " 920cbcaad514cc185634f6f0dcd71df5e8f4ee4456d440a22e0f8c0f142a8203"
80
78
python-version : " 3.10"
81
- cache : " pip"
82
- cache-dependency-path : |
83
- **/pyproject.toml
84
- **/requirements*.txt
85
- **/test-requirements*.txt
79
+ enable-cache : true
80
+ cache-dependency-glob : " **/pyproject.toml"
86
81
87
82
- name : Install dependencies
88
- run : pip install -r test-requirements.txt --upgrade pip
83
+ run : uv sync
89
84
90
85
- name : Build package
91
- run : |
92
- pip install setuptools wheel
93
- python setup.py sdist bdist_wheel
86
+ run : uv build
94
87
95
88
- name : Publish package
96
89
uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
0 commit comments