Skip to content
Closed
Show file tree
Hide file tree
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
28 changes: 27 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,63 @@ on:
workflow_dispatch:

jobs:
detect_changes:
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
relevant:
- "commitizen/**"
- "tests/**"
# - ".github/workflows/**"
python-check:
needs: detect_changes
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
platform: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: No relevant changes, fast-path success
if: ${{ needs.detect_changes.outputs.relevant != 'true' }}
run: echo "No relevant file changes; skipping tests and linters."

- uses: actions/checkout@v6
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
run: |
uv --version
uv sync --frozen --group base --group test --group linters
- name: Run tests and linters
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
uv run --no-sync poe ci
shell: bash
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ needs.detect_changes.outputs.relevant == 'true' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
uses: codecov/codecov-action@v5
if: ${{ !cancelled() }}
if: ${{ needs.detect_changes.outputs.relevant == 'true' && !cancelled() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
4 changes: 3 additions & 1 deletion commitizen/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def __init__(self, config: BaseConfig, *args: object) -> None:

def __call__(self) -> None:
if self.config.path:
out.line(f"Config file {self.config.path} already exists")
out.line(
f"Config file {self.config.path} already exists."
) # Check if the change triggers the pipeline
return

out.info("Welcome to commitizen!\n")
Expand Down
Loading