[agent] chore: add github actions#155
Open
guillaumejparis wants to merge 10 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions CI pipeline for the agent (multi-OS/multi-arch build, lint, audit, tests, and optional artifact publishing), and includes small Rust error-handling/logging cleanups to avoid unwrap_err() patterns.
Changes:
- Introduce
.github/workflows/agent-ci.ymlto build/test/lint/audit across Linux/Windows/macOS (x86_64 + arm64) and publish artifacts to JFrog onpush. - Refactor a few
Resulthandling blocks to usematch/if let Err(...)patterns and improve logged error formatting. - Add a targeted Clippy allow for
too_many_argumentson the keep-alive ping function.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/process/keep_alive.rs |
Avoids unwrap_err() in the keep-alive register loop; adds Clippy allow for argument count. |
src/process/agent_job.rs |
Simplifies job polling Result handling via match. |
src/api/register_agent.rs |
Logs registration HTTP errors without redundant to_string() in the log call. |
src/api/manage_jobs.rs |
Logs list/clean job HTTP errors without redundant to_string() in the log call. |
.github/workflows/agent-ci.yml |
New CI workflow for formatting, clippy, audit, testing, building, installer creation, and JFrog publishing. |
Comments suppressed due to low confidence (1)
.github/workflows/agent-ci.yml:177
- Same issue as the cargo-audit step: on Windows the installed binary is typically
cargo-cache.exe, so checking$HOME/.cargo/bin/cargo-cache(no.exe) can cause needless reinstalls. Make the existence check OS-aware (include.exeon Windows) or use an idempotent install approach to avoid paying the compile/install cost every run.
- name: Install cargo cache
run: |
if [ -x "$HOME/.cargo/bin/cargo-cache" ] || [ -x "$USERPROFILE\.cargo\bin\cargo-cache.exe" ]; then
echo "cargo-cache already installed."
else
cargo install cargo-cache --locked
fi
shell: bash
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| push: | ||
| branches: [main] | ||
| tags: | ||
| - "[0-9]+.[0-9]+.[0-9]+" |
Comment on lines
+105
to
+110
| run: | | ||
| if [ -x "$HOME/.cargo/bin/cargo-audit" ] || [ -x "$USERPROFILE\.cargo\bin\cargo-audit.exe" ]; then | ||
| echo "cargo-audit already installed." | ||
| else | ||
| cargo install cargo-audit --locked | ||
| fi |
2073aa6 to
9f613e4
Compare
|
Thank you for your contribution. This PR is but one step away from being ready for merging: all commits must be PGP-signed. To get started, please see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
9f613e4 to
c1aaae1
Compare
Co-authored-by: Romuald Lemesle <romu.lemesle@gmail.com>
9ad13ae to
f0aefce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Testing Instructions
Related issues
Checklist
Further comments