playr 0.5.1

A minimal TUI music player that plays local files and contacts nothing
Documentation
# Runs the test suite on every branch push and pull request, on each platform
# releases are built for, so a failure shows before a version is tagged.
name: test

on:
  push:
    branches: ["**"]
  pull_request:

permissions:
  contents: read

# A newer push to the same branch replaces a run still in progress.
concurrency:
  group: test-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  # The format and scanner tests fail instead of skipping without ffmpeg.
  PLAYR_REQUIRE_FFMPEG: "1"

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-22.04, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v7

      - name: Install ALSA headers and ffmpeg
        if: runner.os == 'Linux'
        run: sudo apt-get update && sudo apt-get install -y libasound2-dev ffmpeg

      - name: Install ffmpeg
        if: runner.os == 'macOS'
        run: brew install ffmpeg

      - name: Install ffmpeg
        if: runner.os == 'Windows'
        run: choco install ffmpeg -y --no-progress

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      # --no-fail-fast, so one run reports every failing test binary, not the first.
      - name: Test without Opus
        run: cargo test --workspace --no-fail-fast

      - name: Test with Opus
        run: cargo test --workspace --no-fail-fast --features opus

  lint:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v7

      - name: Install ALSA headers
        run: sudo apt-get update && sudo apt-get install -y libasound2-dev

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt

      - uses: Swatinem/rust-cache@v2

      - name: Formatting
        run: cargo fmt --all --check

      - name: Clippy, with and without Opus
        run: make clippy