Skip to content

BUILD-10804 unique check names for branch protection#54

Merged
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-10804-branchProtection
Mar 27, 2026
Merged

BUILD-10804 unique check names for branch protection#54
julien-carsique-sonarsource merged 2 commits intomasterfrom
feat/jcarsique/BUILD-10804-branchProtection

Conversation

@julien-carsique-sonarsource
Copy link
Copy Markdown
Contributor

@julien-carsique-sonarsource julien-carsique-sonarsource commented Mar 27, 2026

BUILD-10804 Aggregate all the various tests in each testing workflow into unique stable check names that will be used for the branch protection.

Relates to https://github.com/SonarSource/re-service-config/pull/1834

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-10804-branchProtection branch from 2d7d2a5 to 2e406f6 Compare March 27, 2026 17:44
add rhysd/actionlint pre-commit hook
update all hooks
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-10804-branchProtection branch from 2e406f6 to 84402c4 Compare March 27, 2026 17:49
@sonarqubecloud
Copy link
Copy Markdown

@sonarqube-cloud-us
Copy link
Copy Markdown

@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review March 27, 2026 17:54
@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team as a code owner March 27, 2026 17:54
@sonar-review-alpha
Copy link
Copy Markdown

Summary

This PR introduces aggregated test jobs across workflows to provide unique, stable check names suitable for branch protection rules. Each workflow (test-action.yml and test-cache-migration-gh2s3.yml) now has an all-green job that depends on all individual test jobs and uses the alls-green action to verify they all pass. This allows branch protection rules to reference a single, stable check name per workflow instead of multiple individual job names. Supporting changes include standardizing runner labels to github-ubuntu-latest-s, updating pre-commit hooks, and adding actionlint validation for GitHub workflows.

What reviewers should know

Start by examining the new aggregator jobs: Look at the all-green job added to test-action.yml (line 337) and test-cache-migration-gh2s3.yml (line 175) to understand the pattern. Each aggregates all test jobs in that workflow using the alls-green action.

Branch protection configuration: These all-green jobs provide stable check names ("All Tests", "All Tests - Cache Migration") that can be used in SonarSource/re-service-config branch protection rules instead of individual job names.

Naming consistency: Note the job rename in test-credential-isolation.yml from credential-isolation-tests to tests-credential-isolation — this aligns with consistent naming conventions across workflows.

Formatting changes: The {} wrapping in test-action.yml echo commands (lines 150-154, 268-276, 289-293) are actionlint style preferences, not functional changes.

Infrastructure changes: Runner labels changed from ubuntu-latest to github-ubuntu-latest-s for consistency; actionlint was added to pre-commit config for YAML validation.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

Clean, focused PR — the all-green aggregator jobs are complete (all test jobs accounted for in each needs list), and test-credential-isolation.yml correctly skips an aggregator since it has only one job that already serves as the stable check name.

🗣️ Give feedback

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 6b573f8 into master Mar 27, 2026
23 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-10804-branchProtection branch March 27, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants