Skip to content

Commit

Permalink
[run-slow] Fixing run slow
Browse files Browse the repository at this point in the history
  • Loading branch information
qubvel committed Dec 23, 2024
1 parent e41d480 commit e1caeb9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,32 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install uv
python -m uv pip install --system -r requirements/required.txt -r requirements/test.txt
- name: Show installed packages
run: |
python -m pip list
- name: Test with pytest
- name: Fetch latest commit message
id: get_commit_message
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV

- name: Test with PyTest
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml
COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}
run: |
echo "COMMIT_MESSAGE: ${{ env.COMMIT_MESSAGE }}"
pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
1 change: 0 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

def get_commit_message():
commit_msg = os.getenv("COMMIT_MESSAGE", "")
raise ValueError(commit_msg)
return commit_msg.lower()


Expand Down

0 comments on commit e1caeb9

Please sign in to comment.