fix: create build/ directory before writing CI reports in code-quality workflow#136
Merged
fix: create build/ directory before writing CI reports in code-quality workflow#136
Conversation
Agent-Logs-Url: https://github.com/jbcrane13/NetMonitor-2.0/sessions/b107a81a-6af0-49b3-9197-3d23446b8e78 Co-authored-by: jbcrane13 <25068427+jbcrane13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update action run status for NetMonitor 2.0
fix: create build/ directory before writing CI reports in code-quality workflow
Apr 10, 2026
jbcrane13
approved these changes
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes CI reliability in the Code Quality workflow by ensuring the build/ output directory exists before writing report files, preventing early job failures on fresh runners.
Changes:
- Create
build/before generating the Periphery JSON report in thedead-codejob. - Create
build/before writing the complexity markdown report in thecomplexity-metricsjob.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
36
to
40
| - name: Upload Periphery report | ||
| if: always() | ||
| run: | | ||
| mkdir -p build | ||
| periphery scan --quiet --format json 2>/dev/null \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Complexity Metricsjob in the Code Quality workflow was failing immediately because thebuild/directory doesn't exist on a fresh runner, causing the redirect tobuild/complexity-report.mdto error out at line 1.Changes
mkdir -p buildat the start of theGenerate complexity reportstep (complexity-metricsjob) — runner has nobuild/dir by defaultmkdir -p buildat the start of theUpload Periphery reportstep (dead-codejob) — same latent issue, same fixTesting Done
xcodebuild test -scheme NetMonitor-macOSon mac-mini)xcodebuild test -scheme NetMonitor-iOSon mac-mini)swiftlint lint --quiet)swiftformat --lint .)Notes for Reviewer
Workflow-only change — no Swift source modified. The Periphery fix is pre-emptive; it would have hit the same failure once the
dead-codejob tried to persist its JSON report.