glowpub 0.5.0

A glowfic to epub converter.
Documentation
name: Run clippy

on:
  push:
    branches: ["*"]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

jobs:
  clippy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/.crates.toml
            ~/.cargo/.crates2.json
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            ~/.rustup/toolchains/
            target/
          key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}

      - name: Install WASM toolchain
        run: rustup target add wasm32-unknown-unknown

      - name: Check project
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

      - name: Check project (WASM)
        # Note lack of --all-targets here because tests and examples are not wasm compatible
        run: cargo clippy --workspace --all-features --target wasm32-unknown-unknown -- -D warnings

  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/.crates.toml
            ~/.cargo/.crates2.json
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            ~/.rustup/toolchains/
            target/
          key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}

      - name: Check project
        run: RUST_BACKTRACE=1 cargo test --workspace --all-targets --all-features