Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Enable PR review comments for rustfmt and clippy #332

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,28 @@ jobs:

runs-on: ${{ matrix.os }}

permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4
- name: Install nightly with clippy and rustfmt
run: |
rustup toolchain install nightly --component rustfmt --component clippy --allow-downgrade
rustup override set nightly
rustup target add --toolchain nightly ${{ matrix.target }}
- name: Run rustfmt check
run: cargo fmt --check
- name: Run Clippy
- name: Format
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: review
- name: Clippy
uses: giraffate/clippy-action@v1
with:
clippy_flags: --all-features --target ${{ matrix.target }} -- -D warnings -D clippy::pedantic
tool_name: clippy-${{ matrix.target }}
reporter: github-pr-review
level: error
fail_on_error: true
github_token: ${{ secrets.GITHUB_TOKEN }}
Loading