quality lints #230
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: quality lints | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: ["main", "rel-*", "ci/*"] | |
| tags: | |
| - "**" | |
| pull_request: | |
| merge_group: | |
| schedule: | |
| - cron: "0 18 * * *" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lints: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Install nightly toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy | |
| - name: clippy | |
| run: cargo +stable clippy --all-features --all-targets -- --deny warnings | |
| - name: clippy (nightly) | |
| run: cargo +nightly clippy --all-features --all-targets | |
| - name: rustfmt | |
| run: cargo +stable fmt --check | |
| - name: rustfmt (nightly) | |
| run: cargo +nightly fmt --check -- --config-path=.rustfmt.unstable.toml | |
| - name: cargo doc | |
| run: cargo +nightly doc --locked --all-features --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings |