Skip to content

Commit

Permalink
CI: fix fmt flickering
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Jul 17, 2024
1 parent 21331c7 commit 04c0c50
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,25 @@ jobs:

- name: Check
id: check
run: cargo fmt --all -- --check
run: >-
cargo fmt --all -- --check ||
(echo "::error::Rust format error." && exit 1)
- name: Format
id: format
if: steps.check.outcome == 'failure'
run: |
cargo fmt --all
cargo fmt --all
# second time is for anti-flickering, because using nightly rustfmt
- name: Suggestions
uses: reviewdog/action-suggester@v1
with:
filter_mode: diff_context
fail_on_error: false
tool_name: Rustfmt
cleanup: false

clippy:
name: Clippy + fmt suggestions
Expand Down Expand Up @@ -539,7 +557,9 @@ jobs:
# needed after clippy fix
- name: fmt
run: cargo fmt --all
run: |
cargo fmt --all
cargo fmt --all
- name: remove config
run: rm -rf .cargo
Expand Down

0 comments on commit 04c0c50

Please sign in to comment.