feat: add missing debug/clone implementations (#6) #90
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 | |
| permissions: | |
| contents: read | |
| on: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| merge_group: | |
| env: | |
| RUST_MIN: "1.88" | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| name: Run tests | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy | |
| run: cargo clippy --all-features --examples -- -D warnings | |
| - name: Build | |
| run: cargo build | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Build all | |
| run: cargo build --all-features --examples | |
| - name: Test | |
| run: | | |
| cargo test --doc --all-features | |
| cargo llvm-cov test --all-features --codecov --ignore-filename-regex ".cargo|.*_test\.rs" > ./codecov.json | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| verbose: true | |
| fail_ci_if_error: true | |
| files: ./codecov.json | |
| release-build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build all | |
| run: cargo build --release --all-features --examples | |
| min-versions: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| name: Check min dependency versions | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@cargo-hack | |
| - name: Install cargo-minimal-versions | |
| uses: taiki-e/install-action@cargo-minimal-versions | |
| - name: Cargo minimal-versions | |
| run: cargo minimal-versions check | |
| min-rust: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| name: Check MSRV | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # this interferes with the rust version that gets used | |
| - name: remove toolchain | |
| run: rm rust-toolchain.toml | |
| - name: Install Rust ${{ env.RUST_MIN }} | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_MIN }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Cargo check | |
| run: cargo check --workspace --all-features | |
| lint: | |
| name: "Lint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: Check typos | |
| uses: crate-ci/typos@master | |
| - name: rustfmt | |
| run: cargo +nightly fmt --all --check | |
| - name: Verify docs | |
| run: cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --no-deps --all-features | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs -D warnings | |
| - name: Lint dependencies | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| # disabling until https://github.com/rustsec/audit-check/issues/28 is fixed | |
| # - name: Security vulnerabilities audit | |
| # uses: rustsec/audit-check@v2.0.0 | |
| # with: | |
| # token: ${{ secrets.GITHUB_TOKEN }} |