preprinttui 0.1.16

Terminal User Interface (TUI) for PreConnect printer.
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI

on:
  pull_request:
    paths:
      - "**/*.rs"
      - ".github/workflows/**"
      - "Cargo.toml"
      - "Cargo.lock"
  push:
    branches:
      - main
    paths:
      - "**/*.rs"
      - ".github/workflows/**"
      - "Cargo.toml"
      - "Cargo.lock"
  workflow_dispatch:

permissions:
  contents: read

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  check:
    name: Code Quality
    runs-on: ubuntu-latest
    timeout-minutes: 15

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

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

      - name: Restore Cache
        uses: Swatinem/rust-cache@v2

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

      - name: Run Clippy
        run: cargo clippy --all-targets -- -D warnings

      - name: Run Tests
        run: cargo test

      - name: Build Release
        run: cargo build --release --locked