Skip to content

Conversation

@tangrufus
Copy link
Member

@tangrufus tangrufus commented Dec 7, 2025

No description provided.

Refactor e2e job to use shared matrix configuration.
Copilot AI review requested due to automatic review settings December 7, 2025 22:29
Copy link

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

This PR refactors the GitHub Actions workflow to use YAML anchors for reducing duplication in matrix configurations. The build job's matrix is now defined as an anchor (&matrix) and referenced in the e2e job using an alias (*matrix), eliminating the need to maintain duplicate matrix definitions.

Key Changes

  • Defined a YAML anchor (&matrix) on the build job's matrix configuration
  • Replaced the e2e job's explicit matrix definition with a reference to the shared matrix anchor (*matrix)

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

variant: darwin_arm64
- runs-on: macos-15-intel
variant: darwin_amd64
matrix: *matrix
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

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

[nitpick] The e2e job will now inherit the spc-variant field from the anchor definition (defined in the build job at lines 56, 59, 62, 65), even though this field is not used by the e2e job. While this won't cause functional issues, it introduces unnecessary matrix configuration that could confuse future maintainers.

Consider one of these approaches:

  1. Keep the matrices separate to maintain clarity about which fields each job uses
  2. Split the anchor into a base configuration that both jobs extend with their specific fields (though GitHub Actions YAML doesn't support merge keys with anchors)
  3. Accept the extra field as a minor trade-off for reduced duplication and add a comment explaining that not all matrix fields are used by all jobs
Suggested change
matrix: *matrix
matrix:
include:
- runs-on: ubuntu-24.04-arm
variant: linux_arm64
- runs-on: ubuntu-24.04
variant: linux_amd64
- runs-on: macos-15
variant: darwin_arm64
- runs-on: macos-15-intel
variant: darwin_amd64

Copilot uses AI. Check for mistakes.
@tangrufus tangrufus enabled auto-merge (squash) December 7, 2025 22:31
@tangrufus tangrufus merged commit a0f8fda into main Dec 7, 2025
32 checks passed
@tangrufus tangrufus deleted the tangrufus-patch-1 branch December 7, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants