Merge pull request #56 from the-lean-crate/dependabot/cargo/bytesize-… #165
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: Rust | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| SIZE_LIMIT: 10KB | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run tests | |
| run: make tests | |
| - name: Check crate package size | |
| run: cargo run -- diet --dry-run --package-size-limit ${{ env.SIZE_LIMIT }} | |
| - name: Check crate package size (with install action) | |
| uses: actions-rs/install@v0.1.2 | |
| with: | |
| crate: cargo-diet | |
| version: latest | |
| - name: Check crate package size (with latest binary) | |
| run: | | |
| curl -LSfs https://raw.githubusercontent.com/the-lean-crate/cargo-diet/master/ci/install.sh | \ | |
| sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl --force --tag v1.2.5 | |
| cargo diet --dry-run --package-size-limit ${{ env.SIZE_LIMIT }} | |
| - name: fmt | |
| run: cargo fmt --all -- --check | |
| - name: clippy | |
| run: cargo clippy |