embystream 0.0.33

Another Emby streaming application (frontend/backend separation) written in Rust.
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:
    name: CI Check
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

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

      - name: Cache cargo dependencies
        uses: Swatinem/rust-cache@v2

      - name: Install Bun
        uses: oven-sh/setup-bun@v2

      - name: Check formatting
        run: cargo fmt -- --check

      - name: Run Clippy linter
        run: cargo clippy -- -D warnings

      - name: Check if code compiles
        run: cargo check

      - name: Build project
        run: cargo build

      - name: Install web dependencies
        working-directory: web
        run: bun install --frozen-lockfile

      - name: Lint web code
        working-directory: web
        run: bun run lint

      - name: Check web formatting
        working-directory: web
        run: bun run format:check

      - name: Build web project
        working-directory: web
        run: bun run build