gif functionality added #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: ["*"] | |
| pull_request: | |
| branches: ["*"] | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Build examples | |
| run: cargo build --examples --all-features | |
| - name: Run tests | |
| run: cargo test --verbose | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| # Check all targets including library, binaries, tests, benches, and examples | |
| - name: Run Clippy (all targets) | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| # Explicit example check for visibility and certainty | |
| # This ensures examples are always checked even if --all-targets behavior changes | |
| - name: Run Clippy on examples | |
| run: cargo clippy --examples --all-features -- -D warnings | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Run security audit | |
| uses: rustsec/audit-check@v1.4.1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| msrv: | |
| name: MSRV Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust 1.70 toolchain | |
| uses: dtolnay/rust-toolchain@1.70 | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check MSRV compatibility | |
| run: cargo check --all-features | |
| deny: | |
| name: Cargo Deny | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Run cargo-deny | |
| uses: EmbarkStudios/cargo-deny-action@v1 | |
| with: | |
| log-level: warn | |
| command: check | |
| arguments: --all-features | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: Run coverage | |
| run: cargo tarpaulin --all-features --out Xml --output-dir coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: coverage/cobertura.xml | |
| fail_ci_if_error: false | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: coverage-report | |
| path: coverage/ |