Open Swoorup opened 7 months ago
@gooroo-dev review
It looks like the git PR diff content was not included in your request. Please provide the diff or the relevant code changes so that I can review them and provide the required feedback.
Yours, Gooroo.dev
@gooroo-dev review
No known files to review.
@gooroo-dev review
I couldn't find any files for me to review. At this moment, I support these file extensions: .js, .jsx, .ts, .coffee, .rb, .cpp, .cc, .cxx, .c, .h, .hpp, .py, .php, .java, .go, .cs, .kt, .kts, .swift, .css, .scss, .sass, .erb, .less, .sass, .rs, .kts.
@gooroo-dev review anyway
I couldn't find any files for me to review. At this moment, I support these file extensions: .js, .jsx, .ts, .coffee, .rb, .cpp, .cc, .cxx, .c, .h, .hpp, .py, .php, .java, .go, .cs, .kt, .kts, .swift, .css, .scss, .sass, .erb, .less, .sass, .rs, .kts.
.github/workflows/ci.yml
.push
and pull_request
events to the main
branch.CARGO_TERM_COLOR
to always
.build
that runs on ubuntu-latest
.actions/checkout@v3
.cargo build --verbose
.cargo test --verbose
.Cache Dependencies: To speed up the build process, you can cache the Cargo dependencies. This can be done by adding a step to cache the Cargo registry and build artifacts:
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
Add Linting: It's a good practice to add a linting step to ensure code quality. You can use cargo clippy
for this purpose:
- name: Run linter
run: cargo clippy --all-targets --all-features -- -D warnings
Separate Build and Test Jobs: For better organization and potential parallelism, you can separate the build and test steps into different jobs:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Build
run: cargo build --verbose
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose
These improvements can help optimize the CI process and ensure better code quality.
Yours, Gooroo.dev
Stabilization is not that far of: https://github.com/rust-lang/rust/issues/106655#issuecomment-1902272292 Probably hold this off until then...