chore(release): v0.2.0 with pre-commit and commitizen #2
This file contains hidden or 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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install ruff | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| test: | |
| name: test (py${{ matrix.python }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| # sounddevice needs PortAudio; phonemizer (pulled in by kokoro-onnx) needs espeak-ng. | |
| - name: install system audio/phoneme deps | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libportaudio2 espeak-ng | |
| - run: pip install -e ".[dev]" | |
| - run: pytest | |
| commits: | |
| name: commit message lint | |
| # Only meaningful on PRs (compare base..HEAD). Skip on push-to-main. | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install commitizen | |
| - name: validate commit messages against conventional-commits | |
| run: cz check --rev-range ${{ github.event.pull_request.base.sha }}..HEAD |