-
Notifications
You must be signed in to change notification settings - Fork 18
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: fix clippy actions workflow and add cargo-fmt action #353
Conversation
- Renamed the job from "rust-clippy-analyze" to "rust-fmt-analyze" - Updated the name of the job to "Run rust-fmt analyzing" - Removed unused permissions for "security-events" and "actions" - Added the step to configure the cache for cargo - Updated the command to run "cargo fmt"
- Update the configuration for running rust-clippy in GitHub Actions - Update the version of the Actions used in the workflow - Refactor the rust-fmt job in GitHub Actions to remove the continue-on-error flag
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #353 +/- ##
==========================================
- Coverage 41.62% 41.61% -0.01%
==========================================
Files 134 134
Lines 14120 14120
==========================================
- Hits 5877 5876 -1
- Misses 8243 8244 +1 ☔ View full report in Codecov by Sentry. |
@giangndm Can you please delete the 94MB Cache from here? https://github.com/8xFF/atm0s-media-server/actions/caches Duplicate cache got created because of workflow race condition |
@dhilipsiva I just clear all caches. |
@giangndm Do you want me to make anymore changes on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhilipsiva I will merge it now.
* ci: Improve workflow configuration and code formatting * chore: cargo fmt and install protoc * chore: fix rust-clippy and rust-fmt * ci: Refactor GitHub actions for rust-fmt workflow - Renamed the job from "rust-clippy-analyze" to "rust-fmt-analyze" - Updated the name of the job to "Run rust-fmt analyzing" - Removed unused permissions for "security-events" and "actions" - Added the step to configure the cache for cargo - Updated the command to run "cargo fmt" * test: break clippy on purpose to test GH Actions * Refactor GitHub workflows and protoc compilation * chore: Update GitHub workflows for Rust code analysis - Update the configuration for running rust-clippy in GitHub Actions - Update the version of the Actions used in the workflow - Refactor the rust-fmt job in GitHub Actions to remove the continue-on-error flag * ci: Improve GitHub actions for Rust codebase * ci: fail clippy while piping, if need be * ci: Update GitHub Actions workflow for rust-clippy * ci: fix clippy warnings * ci: fix last error * ci: restore comments
Clippy was already being used. But it never reported any problems. The errors were always suppressed because we were piping the clippy output to cargo-sarif. This piping masked the exit code of clippy command. Which is why you might notice clippy is run twice now.
Note: actions-rs was deprecated and archived because GH Actions now support for rust by default: https://github.com/actions/starter-workflows/blob/main/ci/rust.yml
Apart from this, I have also added a cargo fmt action, added cache support and fixed remaining clippy warnings.
CC: @giangndm: #349 (comment)
Checklist