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: fix clippy actions workflow and add cargo-fmt action #353

Merged
merged 13 commits into from
Jul 18, 2024

Conversation

dhilipsiva
Copy link
Contributor

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

  • I have tested the changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation, if necessary.

- 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
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 41.61%. Comparing base (da3d144) to head (814b14c).

Files Patch % Lines
packages/media_utils/src/f16.rs 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@dhilipsiva
Copy link
Contributor Author

@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

@giangndm
Copy link
Contributor

@dhilipsiva I just clear all caches.

@dhilipsiva
Copy link
Contributor Author

dhilipsiva commented Jul 18, 2024

@giangndm Do you want me to make anymore changes on this?

Copy link
Contributor

@giangndm giangndm left a 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.

@giangndm giangndm merged commit 3e3b61d into 8xFF:master Jul 18, 2024
10 of 11 checks passed
giangndm pushed a commit to giangndm/8xFF-decentralized-media-server that referenced this pull request Nov 26, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants