@@ -130,6 +130,12 @@ jobs:
130130 affected_count=$(yarn --silent nx show projects -t type-check:integration --affected --verbose false | wc -l | tr -d ' ')
131131 echo "value=$affected_count" >> $GITHUB_OUTPUT
132132
133+ - name : Affected test:integration Projects
134+ id : affected_projects_test_count
135+ run : |
136+ affected_count=$(yarn --silent nx show projects -t test:integration --affected --verbose false | wc -l | tr -d ' ')
137+ echo "value=$affected_count" >> $GITHUB_OUTPUT
138+
133139 - name : type-check (affected)
134140 id : type-check
135141 if : steps.affected_projects_type_check_count.outputs.value > 0
@@ -150,6 +156,15 @@ jobs:
150156 path : tsc-logs
151157 retention-days : 1
152158
159+ # run targets only on affected changes - need to run this outside nx runner context to avoid https://github.com/nrwl/nx/issues/30562
160+ - name : test (affected)
161+ id : test
162+ if : steps.affected_projects_test_count.outputs.value > 0
163+ run : |
164+ yarn nx run-many -p react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} -t build:integration --nxBail
165+ yarn workspace @fluentui/react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} test:integration
166+ continue-on-error : true
167+
153168 # run targets only on affected changes - need to run this outside nx runner context to avoid https://github.com/nrwl/nx/issues/30562
154169 - name : e2e (affected)
155170 id : e2e
@@ -176,14 +191,16 @@ jobs:
176191 echo "" >> $GITHUB_STEP_SUMMARY
177192 echo "- Type-check: ${{ steps.type-check.outcome }}" >> $GITHUB_STEP_SUMMARY
178193 echo "- E2E: ${{ steps.e2e.outcome }}" >> $GITHUB_STEP_SUMMARY
194+ echo "- Test: ${{ steps.test.outcome }}" >> $GITHUB_STEP_SUMMARY
179195
180- if [[ "${{ steps.type-check.outcome }}" == "success" && "${{ steps.e2e.outcome }}" == "success" ]]; then
196+ if [[ "${{ steps.type-check.outcome }}" == "success" && "${{ steps.e2e.outcome }}" == "success" && "${{ steps.test.outcome }}" == "success" ]]; then
181197 echo "✅ React ${{ matrix.react }} / v${{ matrix.fluentui }} integration tests passed"
182198 exit 0
183199 else
184200 echo "❌ React ${{ matrix.react }} / v${{ matrix.fluentui }} integration tests failed"
185201 echo "Type-check: ${{ steps.type-check.outcome }}"
186202 echo "E2E: ${{ steps.e2e.outcome }}"
203+ echo "Test: ${{ steps.test.outcome }}"
187204 exit 1
188205 fi
189206
0 commit comments