Small fixes to grouped airplay playback and late joining #128
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
| # This workflow will install Python dependencies, run tests and lint | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - stable | |
| - dev | |
| pull_request: | |
| branches: | |
| - stable | |
| - dev | |
| workflow_dispatch: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: "Git ref to checkout" | |
| required: false | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| # Cache apt .deb files to speed up ffmpeg installation (in home to avoid permission issues). | |
| - name: Cache apt packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/apt-packages | |
| key: apt-ffmpeg-${{ runner.os }} | |
| - name: Install ffmpeg | |
| run: | | |
| # Restore cached .deb files to apt cache (if any) | |
| sudo cp ~/.cache/apt-packages/*.deb /var/cache/apt/archives/ 2>/dev/null || true | |
| sudo apt-get update && sudo apt-get install -y ffmpeg | |
| # Save .deb files for next run | |
| mkdir -p ~/.cache/apt-packages && cp /var/cache/apt/archives/*.deb ~/.cache/apt-packages/ 2>/dev/null || true | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Cache uv packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-3.12-${{ hashFiles('requirements_all.txt', 'pyproject.toml') }} | |
| - name: Install dependencies | |
| run: uv pip install --system . .[test] -r requirements_all.txt | |
| - name: Lint/test with pre-commit | |
| run: SKIP=no-commit-to-branch pre-commit run --all-files | |
| test: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.12" | |
| steps: | |
| - name: Check out code from GitHub | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Cache apt .deb files to speed up ffmpeg installation (in home to avoid permission issues). | |
| - name: Cache apt packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/apt-packages | |
| key: apt-ffmpeg-${{ runner.os }} | |
| - name: Install ffmpeg | |
| run: | | |
| # Restore cached .deb files to apt cache (if any) | |
| sudo cp ~/.cache/apt-packages/*.deb /var/cache/apt/archives/ 2>/dev/null || true | |
| sudo apt-get update && sudo apt-get install -y ffmpeg | |
| # Save .deb files for next run | |
| mkdir -p ~/.cache/apt-packages && cp /var/cache/apt/archives/*.deb ~/.cache/apt-packages/ 2>/dev/null || true | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Cache uv packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/uv | |
| key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements_all.txt', 'pyproject.toml') }} | |
| - name: Install dependencies | |
| run: uv pip install --system . .[test] -r requirements_all.txt | |
| - name: Pytest | |
| run: pytest --durations 10 --cov-report term-missing --cov=music_assistant --cov-report=xml tests/ |