Skip to content

Commit e1caeb9

Browse files
committed
[run-slow] Fixing run slow
1 parent e41d480 commit e1caeb9

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,32 @@ jobs:
3636
runs-on: ${{ matrix.os }}
3737
steps:
3838
- uses: actions/checkout@v4
39+
3940
- name: Set up Python ${{ matrix.python-version }}
4041
uses: actions/setup-python@v5
4142
with:
4243
python-version: ${{ matrix.python-version }}
44+
4345
- name: Install dependencies
4446
run: |
4547
python -m pip install uv
4648
python -m uv pip install --system -r requirements/required.txt -r requirements/test.txt
49+
4750
- name: Show installed packages
4851
run: |
4952
python -m pip list
50-
- name: Test with pytest
53+
54+
- name: Fetch latest commit message
55+
id: get_commit_message
56+
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
57+
58+
- name: Test with PyTest
5159
env:
52-
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
53-
run: pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml
60+
COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}
61+
run: |
62+
echo "COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}"
63+
pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml
64+
5465
- name: Upload coverage reports to Codecov
5566
uses: codecov/codecov-action@v5
5667
with:

tests/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
def get_commit_message():
1414
commit_msg = os.getenv("COMMIT_MESSAGE", "")
15-
raise ValueError(commit_msg)
1615
return commit_msg.lower()
1716

1817

0 commit comments

Comments
 (0)