@@ -120,64 +120,4 @@ jobs:
120120 echo "Running E2E tests with realm: ${TEST_REALM}"
121121
122122 # Run E2E tests with JSON output for parsing
123- pnpm --filter @salesforce/b2c-cli run test:e2e --reporter json --reporter-option output=e2e-results.json
124-
125- - name : Parse E2E Results
126- if : always() && steps.e2e-test.conclusion != 'cancelled' && steps.check-secrets.outputs.has-secrets == 'true'
127- run : |
128- if [ -f "e2e-results.json" ]; then
129- # Extract test summary from JSON results
130- TESTS=$(cat e2e-results.json | jq -r '.stats.tests // 0')
131- PASSES=$(cat e2e-results.json | jq -r '.stats.passes // 0')
132- FAILURES=$(cat e2e-results.json | jq -r '.stats.failures // 0')
133- DURATION=$(cat e2e-results.json | jq -r '.stats.duration // 0')
134-
135- echo "## E2E Test Summary" >> $GITHUB_STEP_SUMMARY
136- echo "- **Total Tests:** $TESTS" >> $GITHUB_STEP_SUMMARY
137- echo "- **Passed:** $PASSES" >> $GITHUB_STEP_SUMMARY
138- echo "- **Failed:** $FAILURES" >> $GITHUB_STEP_SUMMARY
139- echo "- **Duration:** ${DURATION}ms" >> $GITHUB_STEP_SUMMARY
140- echo "" >> $GITHUB_STEP_SUMMARY
141-
142- # Add failure details if any
143- if [ "$FAILURES" -gt "0" ]; then
144- echo "### Failed Tests" >> $GITHUB_STEP_SUMMARY
145- echo '```' >> $GITHUB_STEP_SUMMARY
146- cat e2e-results.json | jq -r '.failures[]? | "[X] " + .fullTitle + "\n " + .err.message' >> $GITHUB_STEP_SUMMARY
147- echo '```' >> $GITHUB_STEP_SUMMARY
148- fi
149- fi
150- - name : Upload E2E Test Results
151- if : always() && steps.e2e-test.conclusion != 'cancelled' && steps.check-secrets.outputs.has-secrets == 'true'
152- uses : actions/upload-artifact@v4
153- with :
154- name : e2e-test-results-${{ matrix.os }}-node${{ matrix.node_version }}-${{ github.run_number }}
155- path : e2e-results.json
156- retention-days : 30
157- - name : Notify on Failure
158- if : failure() && (github.event_name == 'schedule' || github.event_name == 'push') && steps.check-secrets.outputs.has-secrets == 'true'
159- uses : actions/github-script@v7
160- with :
161- script : |
162- const issue = {
163- owner: context.repo.owner,
164- repo: context.repo.repo,
165- title: `CLI E2E Tests Failed - ${new Date().toISOString().split('T')[0]}`,
166- body: `## CLI E2E Test Failure
167-
168- The CLI E2E tests have failed. Please investigate.
169-
170- **Workflow:** ${context.workflow}
171- **Run:** ${context.runNumber}
172- **Commit:** ${context.sha}
173- **Event:** ${context.eventName}
174-
175- [View workflow run](${context.payload.repository.html_url}/actions/runs/${context.runId})
176- `,
177- labels: ['bug', 'e2e-failure', 'cli', 'needs-investigation']
178- };
179-
180- // Only create issue for scheduled runs to avoid spam
181- if (context.eventName === 'schedule') {
182- github.rest.issues.create(issue);
183- }
123+ pnpm --filter @salesforce/b2c-cli run test:e2e
0 commit comments