Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore (ci): adopt astral-sh actions #1014

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
- name: Set up Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install dependencies
run: python -m pip install -r requirements/test.txt
adamjstewart marked this conversation as resolved.
Show resolved Hide resolved
run: uv pip install -r requirements/test.txt

# Update output format to enable automatic inline annotations.
- name: Run Ruff Linter
run: ruff check --output-format=github
Expand All @@ -38,22 +40,18 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@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
run: uv pip install -r requirements/required.txt -r requirements/test.txt

- name: Show installed packages
run: |
python -m pip list
run: uv pip list

- name: Test with PyTest
run: |
pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml -k "not logits_match"
run: uv run pytest -v -rsx -n 2 --cov=segmentation_models_pytorch --cov-report=xml --cov-config=pyproject.toml -k "not logits_match"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand All @@ -67,30 +65,27 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install uv
python -m uv pip install --system -r requirements/required.txt -r requirements/test.txt
run: uv pip install -r requirements/required.txt -r requirements/test.txt
- name: Show installed packages
run: uv pip list
- name: Test with PyTest
run: RUN_SLOW=1 pytest -v -rsx -n 2 -k "logits_match"
run: RUN_SLOW=1 uv run pytest -v -rsx -n 2 -k "logits_match"

minimum:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install uv
python -m uv pip install --system -r requirements/minimum.old -r requirements/test.txt
run: uv pip install -r requirements/minimum.old -r requirements/test.txt
- name: Show installed packages
run: |
python -m pip list
run: uv pip list
- name: Test with pytest
run: pytest -v -rsx -n 2 -k "not logits_match"
run: uv run pytest -v -rsx -n 2 -k "not logits_match"
Loading