Merge pull request #60 from fadelabs/fix/code-review-findings #115
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: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --locked --python ${{ matrix.python-version }} --extra dev | |
| - name: Lint (ruff check) | |
| run: uv run ruff check src/ tests/ packages/ | |
| - name: Format check (ruff format) | |
| run: uv run ruff format --check src/ tests/ packages/ | |
| - name: Test (pytest) | |
| run: uv run pytest tests/ -x -q --tb=short | |
| optional-deps: | |
| name: Optional dependencies | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install Python 3.12 | |
| run: uv python install 3.12 | |
| - name: Install with optional extras | |
| run: uv sync --locked --python 3.12 --extra dev --extra matching --extra separation --extra processing | |
| - name: Test optional dependencies | |
| run: uv run pytest tests/test_optional_deps.py packages/phantom-audio-separation/tests -x -q --tb=short | |
| security: | |
| name: Dependency audit (pip-audit) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install Python 3.12 | |
| run: uv python install 3.12 | |
| - name: Audit dependencies | |
| run: uv run --with pip-audit pip-audit |