Skip to content

fix: create build/ directory before writing CI reports in code-quality workflow#136

Merged
jbcrane13 merged 2 commits intomainfrom
copilot/update-action-run-status
Apr 10, 2026
Merged

fix: create build/ directory before writing CI reports in code-quality workflow#136
jbcrane13 merged 2 commits intomainfrom
copilot/update-action-run-status

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Summary

The Complexity Metrics job in the Code Quality workflow was failing immediately because the build/ directory doesn't exist on a fresh runner, causing the redirect to build/complexity-report.md to error out at line 1.

Changes

  • Added mkdir -p build at the start of the Generate complexity report step (complexity-metrics job) — runner has no build/ dir by default
  • Added mkdir -p build at the start of the Upload Periphery report step (dead-code job) — same latent issue, same fix

Testing Done

  • Unit tests pass (xcodebuild test -scheme NetMonitor-macOS on mac-mini)
  • iOS tests pass (xcodebuild test -scheme NetMonitor-iOS on mac-mini)
  • SwiftLint clean — no new errors (swiftlint lint --quiet)
  • SwiftFormat clean — no reformats needed (swiftformat --lint .)
  • Manual verification on device / simulator

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-code job tried to persist its JSON report.

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
Copilot AI requested a review from jbcrane13 April 10, 2026 03:39
@jbcrane13 jbcrane13 marked this pull request as ready for review April 10, 2026 05:57
Copilot AI review requested due to automatic review settings April 10, 2026 05:57
@jbcrane13 jbcrane13 merged commit 50e46ee into main Apr 10, 2026
1 check passed
@jbcrane13 jbcrane13 deleted the copilot/update-action-run-status branch April 10, 2026 05:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the dead-code job.
  • Create build/ before writing the complexity markdown report in the complexity-metrics job.

💡 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 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants