-
Notifications
You must be signed in to change notification settings - Fork 473
chore: refactor github actions #5055
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
chore: refactor github actions #5055
Conversation
3d4a61c to
c9c1040
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5055 +/- ##
==========================================
+ Coverage 29.72% 30.51% +0.79%
==========================================
Files 234 232 -2
Lines 26186 25957 -229
==========================================
+ Hits 7785 7922 +137
+ Misses 17864 17496 -368
- Partials 537 539 +2
🚀 New features to boost your workflow:
|
c9c1040 to
94ca6ab
Compare
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.
Pull Request Overview
This PR refactors GitHub Actions workflow by extracting repeated setup and testing steps into modular composite actions. The changes improve maintainability by centralizing common logic and replacing inline bash matrix generation with a declarative JSON data file.
Key Changes
- Extracted repeated setup steps into reusable composite actions (
setup-tracee-alpine,setup-tracee-ubuntu) - Consolidated test execution logic into dedicated actions (
run-unit-tests,run-integration-tests,run-e2e-tests) - Replaced inline bash script for kernel matrix generation with a JSON data file and a dedicated composite action
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr.yaml |
Replaced inline setup and testing steps with calls to new composite actions across multiple jobs |
.github/data/kernel-test-matrix.json |
New JSON data file containing kernel test configurations (AMI IDs, architectures, names) |
.github/actions/setup-tracee-alpine/action.yaml |
New composite action for Alpine Linux environment setup (Git ownership, dependencies) |
.github/actions/setup-tracee-ubuntu/action.yaml |
New composite action for Ubuntu environment setup (Git installation, ownership, dependencies) |
.github/actions/run-unit-tests/action.yaml |
New composite action to run unit tests and upload codecov results |
.github/actions/run-integration-tests/action.yaml |
New composite action to run integration tests and upload codecov results |
.github/actions/run-e2e-tests/action.yaml |
New composite action for E2E tests with artifact handling and failure detection |
.github/actions/generate-kernel-matrix/action.yaml |
New composite action to generate kernel test matrix from JSON data file using jq |
Comments suppressed due to low confidence (1)
.github/workflows/pr.yaml:490
- The matrix field 'sufix' is misspelled. It should be 'suffix' to follow standard English spelling. Note: This issue depends on fixing the spelling in the generate-kernel-matrix action.
- graas_ami-${{ matrix.ami }}_${{ github.event.number }}${{ github.run_attempt }}-${{ github.run_id }}_${{ matrix.sufix }}
|
|
||
| # Read the JSON file and add timestamp suffix to each entry | ||
| timestamp=$(date +%s) | ||
| matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {sufix: $ts, job_name: .name}]' "$DATA_FILE") |
Copilot
AI
Nov 20, 2025
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.
The field 'sufix' is misspelled. It should be 'suffix' to follow standard English spelling.
| matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {sufix: $ts, job_name: .name}]' "$DATA_FILE") | |
| matrix=$(jq --arg ts "$timestamp" -c '[.[] | . + {suffix: $ts, job_name: .name}]' "$DATA_FILE") |
geyslan
left a comment
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.
LGTM. Let's discuss next steps.
I will first try to see if the reusable workflows we've discussed offline fits the purpose here and fixes the relevant sync conflicts. If it does I will refactor this PR accordingly. |
fe835fc to
a205714
Compare
Split up many of the jobs to modular actions.
Define runs-on label with a repository variable and a fallback. This should allow us to override the runner label for PRs merging from origin branches.
d21bf0a to
d4365b8
Compare
1. Explain what the PR does
d4365b8 feat(pr): variable runner label
f09c5a1 chore: refactor github actions
2. Explain how to test it
Tests should run the same as before.
3. Other comments