Skip to content

Commit 9f8164c

Browse files
committed
Improve CI failure reporting with continue-on-error
- Added continue-on-error to quality-checks and build-and-validate jobs - All checks now run even if one fails, providing complete feedback - Added failure reporting with specific commands to run locally This addresses the concern about separate failure reporting while keeping the optimization benefits of job consolidation.
1 parent f3a7cb6 commit 9f8164c

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,35 @@ jobs:
119119
${{ runner.os }}-dprint-
120120
121121
- name: Linter
122+
id: lint
123+
continue-on-error: true
122124
run: npm run lint
123125

124126
- name: Unused exports
127+
id: knip
128+
continue-on-error: true
125129
run: npm run knip
126130

127131
- name: Check formatting
132+
id: format
133+
continue-on-error: true
128134
run: npx dprint check
129135

136+
- name: Report failures
137+
if: steps.lint.outcome == 'failure' || steps.knip.outcome == 'failure' || steps.format.outcome == 'failure'
138+
run: |
139+
echo "Quality check failures detected:"
140+
if [ "${{ steps.lint.outcome }}" == "failure" ]; then
141+
echo "Linting failed - run 'npm run lint' to see issues"
142+
fi
143+
if [ "${{ steps.knip.outcome }}" == "failure" ]; then
144+
echo "Unused exports detected - run 'npm run knip' to see issues"
145+
fi
146+
if [ "${{ steps.format.outcome }}" == "failure" ]; then
147+
echo "Formatting issues found - run 'npx dprint check' to see issues"
148+
fi
149+
exit 1
150+
130151
browser-integration:
131152
runs-on: ubuntu-latest
132153

@@ -154,23 +175,56 @@ jobs:
154175
- run: npm ci
155176

156177
- name: Build src
178+
id: build-src
179+
continue-on-error: true
157180
run: npx hereby build-src
158181

159182
- name: Build scripts
183+
id: build-scripts
184+
continue-on-error: true
160185
run: npx hereby scripts
161186

162187
- name: ESLint tests
188+
id: eslint-tests
189+
continue-on-error: true
163190
run: npx hereby run-eslint-rules-tests
164191

165192
- name: Build tsc
193+
id: build-tsc
194+
continue-on-error: true
166195
run: npx hereby tsc
167196

168197
- name: Clean
198+
if: steps.build-tsc.outcome == 'success'
169199
run: npx hereby clean-src
170200

171201
- name: Self build
202+
id: self-build
203+
continue-on-error: true
204+
if: steps.build-tsc.outcome == 'success'
172205
run: npx hereby build-src --built
173206

207+
- name: Report failures
208+
if: steps.build-src.outcome == 'failure' || steps.build-scripts.outcome == 'failure' || steps.eslint-tests.outcome == 'failure' || steps.build-tsc.outcome == 'failure' || steps.self-build.outcome == 'failure'
209+
run: |
210+
echo "Build validation failures detected:"
211+
if [ "${{ steps.build-src.outcome }}" == "failure" ]; then
212+
echo "Source build failed - run 'npx hereby build-src'"
213+
fi
214+
if [ "${{ steps.build-scripts.outcome }}" == "failure" ]; then
215+
echo "Scripts build failed - run 'npx hereby scripts'"
216+
fi
217+
if [ "${{ steps.eslint-tests.outcome }}" == "failure" ]; then
218+
echo "ESLint rule tests failed - run 'npx hereby run-eslint-rules-tests'"
219+
fi
220+
if [ "${{ steps.build-tsc.outcome }}" == "failure" ]; then
221+
echo "TSC build failed - run 'npx hereby tsc'"
222+
fi
223+
if [ "${{ steps.self-build.outcome }}" == "failure" ]; then
224+
echo "Self build failed - run 'npx hereby build-src --built'"
225+
fi
226+
exit 1
227+
174228
baselines:
175229
runs-on: ubuntu-latest
176230

0 commit comments

Comments
 (0)