From d8c32307e8ac5a403cca7e6cfea49b2814f06cd7 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sun, 16 Nov 2025 16:40:28 -1000 Subject: [PATCH 1/5] Fix matrix exclude keys in build-dummy-app-webpack-test-bundles job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the missing exclude section to the build-dummy-app-webpack-test-bundles job to match the structure used in dummy-app-integration-tests job. This fixes the GitHub Actions error where matrix exclude keys (ruby-version, node-version, dependency-level) didn't match any keys within the matrix. The exclude section prevents the minimum dependency matrix (Ruby 3.2, Node 20) from running on regular PRs, ensuring it only runs on master, workflow_dispatch, force_run, or when the full-ci label is present. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/integration-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 03231da3ca..bf9f475fd3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -73,6 +73,11 @@ jobs: - ruby-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '3.2'}} node-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '20'}} dependency-level: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && 'minimum'}} + exclude: + # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) + - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} + node-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '20' || '' }} + dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 From 6fc7d322470704df941e0716c5814d20f45dede9 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sun, 16 Nov 2025 16:48:29 -1000 Subject: [PATCH 2/5] Fix matrix configuration to use static include entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous approach used conditional expressions within the include section, which caused GitHub Actions to create matrix entries with false/empty values when conditions weren't met. This resulted in a (false, false, false) matrix entry that failed. Solution: Changed to match the pattern used in gem-tests.yml and examples.yml - use static entries in include section and rely solely on exclude section for conditional logic. Changes: - Converted matrix from array-based to include-based for both jobs - Made include entries static (always add both latest and minimum) - Keep exclude section to conditionally remove minimum on PRs This ensures only valid matrix combinations are created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/integration-tests.yml | 30 +++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bf9f475fd3..ab61efd6f4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -65,14 +65,15 @@ jobs: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true' strategy: matrix: - ruby-version: ['3.4'] - node-version: ['22'] - dependency-level: ['latest'] include: - # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - - ruby-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '3.2'}} - node-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '20'}} - dependency-level: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && 'minimum'}} + # Always run: Latest versions (fast feedback on PRs) + - ruby-version: '3.4' + node-version: '22' + dependency-level: 'latest' + # Master and workflow_dispatch: Minimum supported versions (full coverage) + - ruby-version: '3.2' + node-version: '20' + dependency-level: 'minimum' exclude: # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} @@ -153,14 +154,15 @@ jobs: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true' strategy: matrix: - ruby-version: ['3.4'] - node-version: ['22'] - dependency-level: ['latest'] include: - # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - - ruby-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '3.2'}} - node-version: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && '20'}} - dependency-level: ${{ (github.ref == 'refs/heads/master' || inputs.force_run == true || needs.detect-changes.outputs.has_full_ci_label == 'true') && 'minimum'}} + # Always run: Latest versions (fast feedback on PRs) + - ruby-version: '3.4' + node-version: '22' + dependency-level: 'latest' + # Master and workflow_dispatch: Minimum supported versions (full coverage) + - ruby-version: '3.2' + node-version: '20' + dependency-level: 'minimum' exclude: # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} From d7ed9e5902c23c725982f5e8877f3006465e350c Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sun, 16 Nov 2025 16:58:56 -1000 Subject: [PATCH 3/5] Refactor examples workflow to use dynamic matrix configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace problematic include/exclude approach with setup-matrix job that generates different matrices based on branch and trigger context. The previous approach using conditional expressions in exclude with empty strings ('') didn't work reliably - GitHub Actions can't truly conditionally exclude matrix entries this way. New approach: - Add setup-matrix job that evaluates conditions and outputs JSON matrix - examples job uses fromJson() to consume the dynamic matrix - On PRs: runs 1 job (Ruby 3.4 + latest) for fast feedback - On master/workflow_dispatch/force_run/full-ci: runs 2 jobs for full coverage Benefits: - Actually works (no empty string workarounds) - Clear and maintainable (explicit bash conditions) - Debuggable (matrix output visible in logs) - Flexible (easy to add more conditions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/examples.yml | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 3846462ea7..294f2dab70 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -57,25 +57,34 @@ jobs: script/ci-changes-detector "$BASE_REF" shell: bash - examples: + setup-matrix: needs: detect-changes + runs-on: ubuntu-22.04 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + run: | + # Determine if we should run full matrix (master, workflow_dispatch, force_run, or full-ci label) + if [[ "${{ github.ref }}" == "refs/heads/master" ]] || \ + [[ "${{ github.event_name }}" == "workflow_dispatch" ]] || \ + [[ "${{ inputs.force_run }}" == "true" ]] || \ + [[ "${{ needs.detect-changes.outputs.has_full_ci_label }}" == "true" ]]; then + # Full matrix: test both latest and minimum supported versions + echo 'matrix={"include":[{"ruby-version":"3.4","dependency-level":"latest"},{"ruby-version":"3.2","dependency-level":"minimum"}]}' >> $GITHUB_OUTPUT + else + # PR matrix: test only latest versions for fast feedback + echo 'matrix={"include":[{"ruby-version":"3.4","dependency-level":"latest"}]}' >> $GITHUB_OUTPUT + fi + + examples: + needs: [detect-changes, setup-matrix] # Run on master, workflow_dispatch, OR when generators needed if: | github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_generators == 'true' strategy: fail-fast: false - matrix: - include: - # Always run: Latest versions (fast feedback on PRs) - - ruby-version: '3.4' - dependency-level: 'latest' - # Master and workflow_dispatch: Minimum supported versions (full coverage) - - ruby-version: '3.2' - dependency-level: 'minimum' - exclude: - # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} - dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} env: SKIP_YARN_COREPACK_CHECK: 0 BUNDLE_FROZEN: ${{ matrix.dependency-level == 'minimum' && 'false' || 'true' }} From 3456dd0b6467834fa6b8313557ac2bdbe26d223f Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sun, 16 Nov 2025 17:40:36 -1000 Subject: [PATCH 4/5] Fix matrix exclude in integration-tests workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply same dynamic matrix approach to integration-tests.yml that was used in examples.yml. This fixes the matrix exclude errors for both build-dummy-app-webpack-test-bundles and dummy-app-integration-tests jobs. Changes: - Add setup-integration-matrix job to generate dynamic matrices - Update both jobs to use fromJson() with the dynamic matrix - Remove broken exclude rules with empty string workarounds Behavior: - On PRs: runs 1 job (Ruby 3.4 + Node 22 + latest) for fast feedback - On master/workflow_dispatch/force_run/full-ci: runs 2 jobs for full coverage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/integration-tests.yml | 56 +++++++++++-------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index ab61efd6f4..b086557cdd 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -58,27 +58,33 @@ jobs: fi shell: bash - build-dummy-app-webpack-test-bundles: + setup-integration-matrix: needs: detect-changes + runs-on: ubuntu-22.04 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + run: | + # Determine if we should run full matrix (master, workflow_dispatch, force_run, or full-ci label) + if [[ "${{ github.ref }}" == "refs/heads/master" ]] || \ + [[ "${{ github.event_name }}" == "workflow_dispatch" ]] || \ + [[ "${{ inputs.force_run }}" == "true" ]] || \ + [[ "${{ needs.detect-changes.outputs.has_full_ci_label }}" == "true" ]]; then + # Full matrix: test both latest and minimum supported versions + echo 'matrix={"include":[{"ruby-version":"3.4","node-version":"22","dependency-level":"latest"},{"ruby-version":"3.2","node-version":"20","dependency-level":"minimum"}]}' >> $GITHUB_OUTPUT + else + # PR matrix: test only latest versions for fast feedback + echo 'matrix={"include":[{"ruby-version":"3.4","node-version":"22","dependency-level":"latest"}]}' >> $GITHUB_OUTPUT + fi + + build-dummy-app-webpack-test-bundles: + needs: [detect-changes, setup-integration-matrix] # Run on master, workflow_dispatch, OR when tests needed on PR if: | github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true' strategy: - matrix: - include: - # Always run: Latest versions (fast feedback on PRs) - - ruby-version: '3.4' - node-version: '22' - dependency-level: 'latest' - # Master and workflow_dispatch: Minimum supported versions (full coverage) - - ruby-version: '3.2' - node-version: '20' - dependency-level: 'minimum' - exclude: - # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} - node-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '20' || '' }} - dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} + matrix: ${{ fromJson(needs.setup-integration-matrix.outputs.matrix) }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -148,26 +154,12 @@ jobs: key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-ruby${{ matrix.ruby-version }}-${{ matrix.dependency-level }} dummy-app-integration-tests: - needs: [detect-changes, build-dummy-app-webpack-test-bundles] + needs: [detect-changes, setup-integration-matrix, build-dummy-app-webpack-test-bundles] # Run on master, workflow_dispatch, OR when tests needed on PR if: | github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true' strategy: - matrix: - include: - # Always run: Latest versions (fast feedback on PRs) - - ruby-version: '3.4' - node-version: '22' - dependency-level: 'latest' - # Master and workflow_dispatch: Minimum supported versions (full coverage) - - ruby-version: '3.2' - node-version: '20' - dependency-level: 'minimum' - exclude: - # Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label) - - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} - node-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && '20' || '' }} - dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && inputs.force_run != true && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} + matrix: ${{ fromJson(needs.setup-integration-matrix.outputs.matrix) }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 From ad67d52b664a803e49335b357ac99177e4ff896d Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sun, 16 Nov 2025 17:56:25 -1000 Subject: [PATCH 5/5] Standardize gem-tests workflow to use dynamic matrix configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert gem-tests.yml to use the same dynamic matrix pattern as integration-tests.yml and examples.yml for consistency. Changes: - Added setup-gem-tests-matrix job to compute matrix based on context - Updated rspec-package-tests to use fromJson(needs.setup-gem-tests-matrix.outputs.matrix) - Removed static include/exclude pattern in favor of dynamic generation - Maintains same behavior: latest on PRs, both latest+minimum on master or with full-ci label Benefits: - Consistent pattern across all three test workflows - More explicit and debuggable (matrix visible in job output) - Prevents potential issues with empty/false values in exclude - Easier to understand and maintain 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/gem-tests.yml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/gem-tests.yml b/.github/workflows/gem-tests.yml index 62773d5bf2..3c4a9e4992 100644 --- a/.github/workflows/gem-tests.yml +++ b/.github/workflows/gem-tests.yml @@ -61,25 +61,32 @@ jobs: script/ci-changes-detector "$BASE_REF" shell: bash - rspec-package-tests: + setup-gem-tests-matrix: needs: detect-changes + runs-on: ubuntu-22.04 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - id: set-matrix + run: | + # Determine if we should run full matrix (master or full-ci label) + if [[ "${{ github.ref }}" == "refs/heads/master" ]] || \ + [[ "${{ needs.detect-changes.outputs.has_full_ci_label }}" == "true" ]]; then + # Full matrix: test both latest and minimum supported versions + echo 'matrix={"include":[{"ruby-version":"3.4","dependency-level":"latest"},{"ruby-version":"3.2","dependency-level":"minimum"}]}' >> $GITHUB_OUTPUT + else + # PR matrix: test only latest versions for fast feedback + echo 'matrix={"include":[{"ruby-version":"3.4","dependency-level":"latest"}]}' >> $GITHUB_OUTPUT + fi + + rspec-package-tests: + needs: [detect-changes, setup-gem-tests-matrix] # Run on master OR when Ruby tests needed on PR if: | (github.ref == 'refs/heads/master' || needs.detect-changes.outputs.run_ruby_tests == 'true') strategy: fail-fast: false - matrix: - include: - # Always run: Latest versions (fast feedback on PRs) - - ruby-version: '3.4' - dependency-level: 'latest' - # Master and full-ci label: Minimum supported versions (full coverage) - - ruby-version: '3.2' - dependency-level: 'minimum' - exclude: - # Skip minimum dependency matrix on regular PRs (run only on master or with full-ci label) - - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} - dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} + matrix: ${{ fromJson(needs.setup-gem-tests-matrix.outputs.matrix) }} env: BUNDLE_FROZEN: ${{ matrix.dependency-level == 'minimum' && 'false' || 'true' }} runs-on: ubuntu-22.04