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