studio-worker 0.2.0

Pull-based image-generation worker for the minis.gg studio.
Documentation
name: Checks

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read

jobs:
  checks:
    name: Format, lint, check, test (${{ matrix.features }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - features: ""
            label: default
            apt: ""
          - features: "all-engines-llm"
            label: llm-bundle
            apt: ""
          - features: "all-engines-stt"
            label: stt-bundle
            apt: ""
          - features: "ui"
            label: ui
            apt: "libgtk-3-dev libdbus-1-dev libxdo-dev libayatana-appindicator3-dev"
    steps:
      - uses: actions/checkout@v6

      - name: Install Linux UI build deps
        if: matrix.apt != ''
        run: |
          sudo apt-get update
          sudo apt-get install -y ${{ matrix.apt }}

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

      - uses: swatinem/rust-cache@v2
        with:
          key: ${{ matrix.label }}

      - name: Check formatting
        if: matrix.features == ''
        run: cargo fmt --check

      - name: Run clippy (tests too)
        run: cargo clippy --tests ${{ matrix.features != '' && format('--features {0}', matrix.features) || '' }} -- -D warnings

      - name: Compile check
        run: cargo check ${{ matrix.features != '' && format('--features {0}', matrix.features) || '' }}

      - name: Run tests
        run: cargo test ${{ matrix.features != '' && format('--features {0}', matrix.features) || '' }}