Skip to content

✨ Add positional arguments, verbose mode, and overwrite protection #34

✨ Add positional arguments, verbose mode, and overwrite protection

✨ Add positional arguments, verbose mode, and overwrite protection #34

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- "*.md"
- "*.png"
- "*.svg"
- "docs/**"
- ".vscode/**"
pull_request:
branches: [ main ]
paths-ignore:
- "*.md"
- "*.png"
- "*.svg"
- "docs/**"
- ".vscode/**"
jobs:
build-and-test:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "ubuntu-22.04 - Python 3.11",
os: ubuntu-22.04,
python-version: "3.11"
}
- {
name: "ubuntu-22.04 - Python 3.12",
os: ubuntu-22.04,
python-version: "3.12"
}
- {
name: "ubuntu-22.04 - Python 3.13",
os: ubuntu-22.04,
python-version: "3.13"
}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: src_dir
- name: Setup python ${{ matrix.config.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.config.python-version }}
cache: 'pip'
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e src_dir[dev]
- name: Lint with ruff
working-directory: src_dir
run: |
ruff check .
ruff format --check .
- name: Type check with mypy
working-directory: src_dir
run: mypy src/sitk_cli
- name: Test with pytest
working-directory: src_dir
run: pytest tests --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.config.python-version == '3.11'
with:
file: src_dir/coverage.xml
fail_ci_if_error: false