scriv 1.3.0

Fast local CLI note manager with optional password encryption
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
  schedule:
    - cron: '0 7 * * 6'

permissions:
  contents: read

jobs:
  build-and-test:
    name: Build, Lint, and Test
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write
      actions: read
    steps:
      - name: Checkout Code
        uses: actions/checkout@v6

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

      - name: Cache Dependencies
        uses: Swatinem/rust-cache@v2
        with:
          shared-key: ci-ubuntu

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

      - name: Install SARIF Tools
        run: cargo install clippy-sarif sarif-fmt

      - name: Clippy
        run:
          cargo clippy
          --all-features
          --message-format=json -- -D warnings | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt

      - name: Upload Clippy Results to GitHub
        if: always()
        uses: github/codeql-action/upload-sarif@v4
        with:
          sarif_file: rust-clippy-results.sarif
          wait-for-processing: true

      - name: Build
        run: cargo build --locked

      - name: Test
        run: cargo test --locked