chore(main): release 0.5.0 #60
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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install ruff | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| types: | |
| name: mypy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| # Installing the package (plus dev extras) gives mypy real types for | |
| # numpy & friends and avoids module-not-found noise. | |
| - 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: mypy | |
| 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.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]" | |
| - name: run tests (with coverage on 3.12) | |
| run: | | |
| if [ "${{ matrix.python }}" = "3.12" ]; then | |
| pytest --cov=stackvox --cov-report=xml --cov-report=term | |
| else | |
| pytest | |
| fi | |
| - name: upload coverage to Codecov | |
| if: matrix.python == '3.12' | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| # CODECOV_TOKEN is optional for public repos; if set we use it. | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-macos: | |
| # Separate job so the existing `test (pyX.Y)` check names stay stable | |
| # (the main ruleset already requires them). stackvox is primarily a | |
| # macOS-first tool — the PortAudio-refresh fix, the `say` fallback, and | |
| # the stackone-say-hooks plugin use case all live on macOS — so we | |
| # validate against at least one Python version on macos-latest. | |
| name: test macos (py${{ matrix.python }}) | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| # phonemizer (pulled in by kokoro-onnx) shells out to espeak-ng. | |
| # PortAudio is bundled by sounddevice's macOS wheel so we don't | |
| # install it separately. | |
| - name: install espeak-ng | |
| run: brew install 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.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 |