Skip to content

Refactor github actions#12774

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

Refactor github actions#12774
vishesh92 wants to merge 5 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 the project, focusing on modularizing environment setup, updating action versions, and improving build and test efficiency. The changes centralize environment setup into reusable composite actions, update runner images and action versions for better compatibility and performance, and streamline artifact handling between build and test jobs. Additionally, the legacy coverage workflow is removed in favor of improved coverage reporting in other workflows.

Workflow modularization and environment setup:

  • Introduced two composite actions, setup-env and install-nonoss, to handle environment setup and installation of non-OSS dependencies, replacing repetitive steps in multiple workflows. (.github/actions/setup-env/action.yml, .github/actions/install-nonoss/action.yml) [1] [2]
  • Updated build and CI workflows to use these composite actions, simplifying YAML and ensuring consistent setup across jobs. (.github/workflows/build.yml, .github/workflows/ci.yml, .github/workflows/main-sonar-check.yml) [1] [2] [3]

Artifact handling and test optimization:

  • Changed CI workflow to build artifacts in a separate job, archive and upload them, then download and extract them in the test job, reducing redundant builds and speeding up tests. (.github/workflows/ci.yml)

Action and runner updates:

  • Updated runner images from ubuntu-22.04 to ubuntu-24.04 and bumped action versions (e.g., actions/checkout, setup-java, setup-python, codecov, docker/login-action, codeql-action) for improved stability and performance. [1] [2] [3] [4] [5]

Coverage reporting improvements:

  • Removed the legacy codecov.yml workflow and integrated coverage reporting directly into the main build and CI workflows, using updated codecov action versions. (.github/workflows/codecov.yml, .github/workflows/ci.yml, .github/workflows/main-sonar-check.yml) [1] [2] [3]

Miscellaneous workflow enhancements:

  • Improved concurrency handling in workflows to avoid unnecessary cancellation of jobs on the main branch. [1] [2] [3]
  • Added Python 3.11 setup and caching to the pre-commit workflow for faster linting. (.github/workflows/pre-commit.yml)

These changes collectively modernize the CI/CD pipeline, reduce duplication, and improve reliability and maintainability.

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.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.92%. Comparing base (74af9b9) to head (83be6d7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #12774   +/-   ##
=========================================
  Coverage     17.92%   17.92%           
- Complexity    16176    16177    +1     
=========================================
  Files          5949     5949           
  Lines        534058   534058           
  Branches      65301    65301           
=========================================
+ Hits          95742    95749    +7     
+ Misses       427560   427552    -8     
- Partials      10756    10757    +1     
Flag Coverage Δ
uitests 3.66% <ø> (ø)
unittests 19.03% <ø> (+<0.01%) ⬆️

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
@vishesh92 vishesh92 force-pushed the refactor-github-actions branch from 7d96b81 to 83be6d7 Compare March 10, 2026 10:45
@DaanHoogland
Copy link
Contributor

@vishesh92 , good to go?

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.

3 participants