@@ -16,12 +16,14 @@ jobs:
16
16
runs-on : ubuntu-latest
17
17
steps :
18
18
- uses : actions/checkout@v4
19
- - name : Install Python
20
- uses : actions /setup-python @v5
19
+ - name : Set up Python
20
+ uses : astral-sh /setup-uv @v5
21
21
with :
22
22
python-version : " 3.11"
23
+
23
24
- name : Install dependencies
24
- run : python -m pip install -r requirements/test.txt
25
+ run : uv pip install -r requirements/test.txt
26
+
25
27
# Update output format to enable automatic inline annotations.
26
28
- name : Run Ruff Linter
27
29
run : ruff check --output-format=github
@@ -38,22 +40,18 @@ jobs:
38
40
- uses : actions/checkout@v4
39
41
40
42
- name : Set up Python ${{ matrix.python-version }}
41
- uses : actions /setup-python @v5
43
+ uses : astral-sh /setup-uv @v5
42
44
with :
43
45
python-version : ${{ matrix.python-version }}
44
46
45
47
- name : Install dependencies
46
- run : |
47
- python -m pip install uv
48
- python -m uv pip install --system -r requirements/required.txt -r requirements/test.txt
48
+ run : uv pip install -r requirements/required.txt -r requirements/test.txt
49
49
50
50
- name : Show installed packages
51
- run : |
52
- python -m pip list
51
+ run : uv pip list
53
52
54
53
- name : Test with PyTest
55
- run : |
56
- pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml -k "not logits_match"
54
+ run : uv run pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml -k "not logits_match"
57
55
58
56
- name : Upload coverage reports to Codecov
59
57
uses : codecov/codecov-action@v5
@@ -67,30 +65,27 @@ jobs:
67
65
steps :
68
66
- uses : actions/checkout@v4
69
67
- name : Set up Python
70
- uses : actions /setup-python @v5
68
+ uses : astral-sh /setup-uv @v5
71
69
with :
72
70
python-version : " 3.10"
73
71
- name : Install dependencies
74
- run : |
75
- python -m pip install uv
76
- python -m uv pip install --system -r requirements/required.txt -r requirements/test.txt
72
+ run : uv pip install -r requirements/required.txt -r requirements/test.txt
73
+ - name : Show installed packages
74
+ run : uv pip list
77
75
- name : Test with PyTest
78
- run : RUN_SLOW=1 pytest -v -rsx -n 2 -k "logits_match"
76
+ run : RUN_SLOW=1 uv run pytest -v -rsx -n 2 -k "logits_match"
79
77
80
78
minimum :
81
79
runs-on : ubuntu-latest
82
80
steps :
83
81
- uses : actions/checkout@v4
84
82
- name : Set up Python
85
- uses : actions /setup-python @v5
83
+ uses : astral-sh /setup-uv @v5
86
84
with :
87
85
python-version : " 3.9"
88
86
- name : Install dependencies
89
- run : |
90
- python -m pip install uv
91
- python -m uv pip install --system -r requirements/minimum.old -r requirements/test.txt
87
+ run : uv pip install -r requirements/minimum.old -r requirements/test.txt
92
88
- name : Show installed packages
93
- run : |
94
- python -m pip list
89
+ run : uv pip list
95
90
- name : Test with pytest
96
- run : pytest -v -rsx -n 2 -k "not logits_match"
91
+ run : uv run pytest -v -rsx -n 2 -k "not logits_match"
0 commit comments