Skip to content

Refactor github actions#12774

Open
vishesh92 wants to merge 4 commits intoapache:mainfrom
shapeblue:refactor-github-actions
Open

Refactor github actions#12774
vishesh92 wants to merge 4 commits intoapache:mainfrom
shapeblue:refactor-github-actions

Conversation

@vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Mar 9, 2026

Description

This PR refactors the github actions.

This pull request refactors the GitHub Actions workflows for CloudStack to improve maintainability, modularity, and efficiency. The main changes include the creation and use of composite actions for environment setup and non-OSS installation, streamlining build and CI workflows, and optimizing artifact handling between build and test jobs.

Workflow modularization and simplification:

  • Introduced new composite actions: setup-env sets up JDK, Python, and APT dependencies, and install-nonoss installs the non-OSS components, reducing duplicated steps in workflow files (.github/actions/setup-env/action.yml, .github/actions/install-nonoss/action.yml). [1] [2]

  • Updated build.yml and ci.yml workflows to use these composite actions, replacing manual setup steps with reusable actions for environment preparation and non-OSS installation (.github/workflows/build.yml, .github/workflows/ci.yml). [1] [2] [3] F383a9b5L60R44)

Artifact management improvements:

  • Changed CI workflow to build artifacts in a dedicated job, archive them, and then download and extract those artifacts in the test job, ensuring consistent build/test environments and speeding up CI (.github/workflows/ci.yml).

Cleanup and optimization:

  • Removed redundant environment detail and build steps, and consolidated test matrix definitions for better readability and maintainability (.github/workflows/ci.yml). [1] [2] [3]

Test matrix formatting:

  • Reformatted the test matrix in the CI workflow for clarity and easier editing, grouping tests by theme and reducing noise in the workflow file (.github/workflows/ci.yml).

These changes make the workflows easier to maintain, reduce duplication, and improve CI/CD efficiency.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the GitHub Actions CI configuration by consolidating repeated setup logic into composite actions and simplifying/merging coverage-related workflows.

Changes:

  • Introduces composite actions for environment setup and installing the non-OSS dependencies.
  • Refactors existing workflows (Build, RAT, Sonar, Simulator CI) to use the composite actions and adjusts concurrency behavior.
  • Removes redundant workflows (main-sonar-check.yml, codecov.yml) in favor of the updated jobs.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
.github/workflows/sonar-check.yml Combines PR + main branch Sonar execution and reuses composite actions.
.github/workflows/rat.yml Refactors RAT checks to use composite actions and updated concurrency behavior.
.github/workflows/ci.yml Refactors simulator CI and splits build/test via artifacts; updates matrix formatting.
.github/workflows/build.yml Refactors build workflow to reuse composite actions.
.github/actions/setup-env/action.yml New composite action to standardize Java/Python/APT dependency setup.
.github/actions/install-nonoss/action.yml New composite action to standardize non-OSS install step.
.github/workflows/main-sonar-check.yml Removed (superseded by updated sonar-check.yml).
.github/workflows/codecov.yml Removed (coverage upload remains handled elsewhere).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +41
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java-version }}
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apt-get install list includes ipmitool twice. This is harmless but noisy; remove the duplicate entry to keep the dependency list maintainable.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.66%. Comparing base (74af9b9) to head (1b23bd9).

❗ There is a different number of reports uploaded between BASE (74af9b9) and HEAD (1b23bd9). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (74af9b9) HEAD (1b23bd9)
uitests 2 1
unittests 2 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #12774       +/-   ##
=============================================
- Coverage     17.92%    3.66%   -14.26%     
=============================================
  Files          5949      454     -5495     
  Lines        534058    38542   -495516     
  Branches      65301     7126    -58175     
=============================================
- Hits          95742     1414    -94328     
+ Misses       427560    36940   -390620     
+ Partials      10756      188    -10568     
Flag Coverage Δ
uitests 3.66% <ø> (ø)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:243

  • With the dedicated .github/workflows/codecov.yml removed, it looks like Codecov uploads are now limited to this integration-test coverage file. If unit-test/aggregate coverage (e.g. the previous client/target/site/jacoco-aggregate/jacoco.xml) is still desired for Codecov, it should be uploaded from an appropriate workflow/job as well, otherwise overall coverage reporting will change.
      - uses: codecov/codecov-action@v4
        with:
          files: jacoco-coverage.xml
          fail_ci_if_error: true
          flags: simulator-marvin-tests
          verbose: true
          name: codecov
          token: ${{ secrets.CODECOV_TOKEN }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vishesh92 vishesh92 force-pushed the refactor-github-actions branch from bffe192 to 402c233 Compare March 10, 2026 06:29
@vishesh92 vishesh92 force-pushed the refactor-github-actions branch from 402c233 to 146ec06 Compare March 10, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants