tempura 0.5.2

Pipeline-based Static site generator
Documentation
name: CI

on:
  push:
    branches: ["master"]
  pull_request:
    branches: ["master"]

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -Dwarnings
  RUSTDOCFLAGS: -Dwarnings

jobs:
  build_and_test:
    name: Build and Test on ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
      
    runs-on: ${{ matrix.os }}
    
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
        
        # [Rust プロジェクトの GitHub Actions で incremental build をするためのテクニック](https://zenn.dev/kt3k/articles/d557cc874961ab)
      - name: Setup | Cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      
      - name: Setup | Python3
        uses: actions/setup-python@v4

      - name: Setup | Restore mtime
        run: python3 ./.github/scripts/git-restore-mtime.py
        
      - name: Setup | cargo-all-features
        uses: baptiste0928/cargo-install@v1.3.0
        with:
          crate: cargo-all-features
      
      - name: Build
        run: cargo build-all-features --all-targets --workspace --verbose
        
      - name: Test
        run: cargo test --all-targets --workspace --verbose
      
      - name: Format
        run: cargo fmt --all -- --check

      - name: Lint
        run: cargo clippy --all-targets --workspace --verbose -- '-Dclippy::all' -Dwarnings '-Dclippy::nursery'

      - name: Lint document
        run: cargo doc --no-deps --workspace --document-private-items --verbose