Skip to content

Commit 3456dd0

Browse files
justin808claude
andcommitted
Fix matrix exclude in integration-tests workflow
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 <[email protected]>
1 parent d7ed9e5 commit 3456dd0

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

.github/workflows/integration-tests.yml

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,33 @@ jobs:
5858
fi
5959
shell: bash
6060

61-
build-dummy-app-webpack-test-bundles:
61+
setup-integration-matrix:
6262
needs: detect-changes
63+
runs-on: ubuntu-22.04
64+
outputs:
65+
matrix: ${{ steps.set-matrix.outputs.matrix }}
66+
steps:
67+
- id: set-matrix
68+
run: |
69+
# Determine if we should run full matrix (master, workflow_dispatch, force_run, or full-ci label)
70+
if [[ "${{ github.ref }}" == "refs/heads/master" ]] || \
71+
[[ "${{ github.event_name }}" == "workflow_dispatch" ]] || \
72+
[[ "${{ inputs.force_run }}" == "true" ]] || \
73+
[[ "${{ needs.detect-changes.outputs.has_full_ci_label }}" == "true" ]]; then
74+
# Full matrix: test both latest and minimum supported versions
75+
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
76+
else
77+
# PR matrix: test only latest versions for fast feedback
78+
echo 'matrix={"include":[{"ruby-version":"3.4","node-version":"22","dependency-level":"latest"}]}' >> $GITHUB_OUTPUT
79+
fi
80+
81+
build-dummy-app-webpack-test-bundles:
82+
needs: [detect-changes, setup-integration-matrix]
6383
# Run on master, workflow_dispatch, OR when tests needed on PR
6484
if: |
6585
github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true'
6686
strategy:
67-
matrix:
68-
include:
69-
# Always run: Latest versions (fast feedback on PRs)
70-
- ruby-version: '3.4'
71-
node-version: '22'
72-
dependency-level: 'latest'
73-
# Master and workflow_dispatch: Minimum supported versions (full coverage)
74-
- ruby-version: '3.2'
75-
node-version: '20'
76-
dependency-level: 'minimum'
77-
exclude:
78-
# Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label)
79-
- 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' || '' }}
80-
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' || '' }}
81-
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' || '' }}
87+
matrix: ${{ fromJson(needs.setup-integration-matrix.outputs.matrix) }}
8288
runs-on: ubuntu-22.04
8389
steps:
8490
- uses: actions/checkout@v4
@@ -148,26 +154,12 @@ jobs:
148154
key: dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-ruby${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
149155

150156
dummy-app-integration-tests:
151-
needs: [detect-changes, build-dummy-app-webpack-test-bundles]
157+
needs: [detect-changes, setup-integration-matrix, build-dummy-app-webpack-test-bundles]
152158
# Run on master, workflow_dispatch, OR when tests needed on PR
153159
if: |
154160
github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run_dummy_tests == 'true'
155161
strategy:
156-
matrix:
157-
include:
158-
# Always run: Latest versions (fast feedback on PRs)
159-
- ruby-version: '3.4'
160-
node-version: '22'
161-
dependency-level: 'latest'
162-
# Master and workflow_dispatch: Minimum supported versions (full coverage)
163-
- ruby-version: '3.2'
164-
node-version: '20'
165-
dependency-level: 'minimum'
166-
exclude:
167-
# Skip minimum dependency matrix on regular PRs (run only on master/workflow_dispatch/force_run/full-ci label)
168-
- 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' || '' }}
169-
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' || '' }}
170-
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' || '' }}
162+
matrix: ${{ fromJson(needs.setup-integration-matrix.outputs.matrix) }}
171163
runs-on: ubuntu-22.04
172164
steps:
173165
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)