gsichtl 0.4.0

Deterministic pixel-art avatars from any seed: monsters, nerdy faces, crests, badges, realms and retro sprites
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
  # Tags run these through release.yml, which publishes only once they pass.
  workflow_call:

permissions:
  contents: read

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

jobs:
  rust:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      # Referenced by branch: this action publishes no release tags.
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      # Both feature sets: Avatar::to_png and its imports exist only with `png`.
      - run: cargo clippy --all-targets --locked -- -D warnings
      - run: cargo clippy --all-targets --all-features --locked -- -D warnings
      - run: cargo test --locked
      - run: cargo test --all-features --locked
      - run: cargo doc --no-deps --all-features --locked
        env:
          RUSTDOCFLAGS: -D warnings
      # Builds the crate as crates.io would get it, so a release cannot fail on packaging.
      - run: cargo publish --dry-run --locked

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      # The rust-version promised in Cargo.toml.
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.91"
      - uses: Swatinem/rust-cache@v2
      - run: cargo build --all-targets --all-features --locked