Remove scikit image #2561
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'CONTRIBUTORS.md' | |
- 'benchmark/**' | |
- 'albumentations/_version.py' | |
jobs: | |
test_and_lint: | |
name: Test and lint | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: [3.9, "3.10", "3.11", "3.12"] | |
include: | |
- operating-system: ubuntu-latest | |
path: ~/.cache/pip | |
- operating-system: windows-latest | |
path: ~\AppData\Local\pip\Cache | |
- operating-system: macos-latest | |
path: ~/Library/Caches/pip | |
fail-fast: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Python packages | |
uses: actions/cache@v4 | |
with: | |
path: ${{ matrix.path }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
${{ runner.os }}-pip- | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip uv | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade uv | |
- name: Install wheel | |
run: uv pip install --system --upgrade wheel | |
- name: Install PyTorch on Linux and Windows | |
if: > | |
matrix.operating-system == 'ubuntu-latest' || | |
matrix.operating-system == 'windows-latest' | |
run: > | |
uv pip install --system --verbose torch==2.4.1+cpu torchvision==0.19.1+cpu --extra-index-url https://download.pytorch.org/whl/cpu | |
- name: Install PyTorch on MacOS | |
if: matrix.operating-system == 'macos-latest' | |
run: > | |
uv pip install --system --verbose torch==2.4.1 torchvision==0.19.1 | |
- name: Install dev requirements | |
run: uv pip install --system -r requirements-dev.txt | |
- name: Install dependencies | |
run: | | |
uv pip install --system . | |
- name: Run PyTest | |
run: pytest --cov . | |
- name: Upload coverage reports to Codecov | |
if: matrix.operating-system == 'ubuntu-latest' && matrix.python-version == '3.10' | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: albumentations-team/albumentations | |
check_code_formatting_types: | |
name: Check code formatting with ruff and mypy | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: check validity of codecov.yaml | |
run: cat codecov.yaml | curl --data-binary @- https://codecov.io/validate | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip uv | |
uv pip install --system . | |
- name: Install dev requirements | |
run: uv pip install --system -r requirements-dev.txt | |
- name: Run checks | |
run: pre-commit run --files $(find albumentations -type f) | |
- name: check-defaults-in-apply | |
run: python -m tools.check_defaults | |
check_transforms_docs: | |
name: Check Readme is not outdated | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip uv | |
uv pip install --system requests | |
uv pip install --system . | |
- name: Run checks for documentation | |
run: python -m tools.make_transforms_docs check README.md | |
- name: Run checks for used by documentation | |
run: python -m tools.make_used_by_docs check |