Skip to content

Improve CodeQL and CI resource usage and speed - #82

Merged
dfed merged 1 commit into
mainfrom
dfed--claude/safedi-ci-wins-86d07c
Oct 26, 2026
Merged

dfed merged 1 commit into
mainfrom
dfed--claude/safedi-ci-wins-86d07c

Conversation

@dfed

@dfed dfed commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the CI improvements from SafeDI 2.1.0 that apply to this repo.

CodeQL: Swift analysis wasn't scanning the library

The Swift job's autobuild found CLI/Package.swift (the SwiftFormat wrapper, which has no targets) and built only that. The log of the last run (40260495542) shows SwiftFormat being fetched and built and no Compiling AsyncQueue, so CodeQL had nothing of ours to analyze. The job took ~9 minutes to report 0 results.

  • Swift now uses build-mode: manual and runs swift build --target AsyncQueue.
  • The build runs natively via arch -arm64 with Xcode's toolchain first on PATH (SafeDI #325). CodeQL's Swift extractor is x86_64-only, so otherwise SwiftPM and the compiler inherit Rosetta from the tracer.
  • actions and ruby analyses run on ubuntu-latest so they don't queue for macOS runners.
  • CodeQL skips Markdown-only changes (paths-ignore; not a required check) and cancels superseded runs.

CI

  • concurrency cancels superseded runs on the same PR.
  • Lint Swift caches CLI/.build so SwiftFormat isn't compiled from source every run.
  • New Build and Test on Latest Swift job on swift:latest (ubuntu, no coverage upload) to catch new-toolchain breakage. Adding it as a required check is a repo-settings change.

Dependabot

Adds .github/dependabot.yml for GitHub Actions, monthly, grouped into one PR. Action major bumps (checkout v7, codecov-action v7, etc.) are left to it.

Not ported

  • .build caching and the retry action: this package has no dependencies.
  • Markdown-only job skipping + Codecov empty upload: lots of setup for rare docs-only PRs.
  • Codecov after_n_builds gating: worth doing separately if partial-upload status flips are seen.

Verification

  • actionlint passes; workflows parse as YAML.
  • The CodeQL build command succeeds locally (Build complete!).
  • On this PR, Analyze (swift) should log Compiling AsyncQueue.

🤖 Generated with Claude Code

Build AsyncQueue explicitly for Swift CodeQL: autobuild only built
CLI/Package.swift, so the library was never compiled under the tracer.
Run the build natively instead of under Rosetta, move the actions and
ruby analyses to ubuntu, and skip CodeQL on Markdown-only changes.

In CI, cancel superseded runs, cache the SwiftFormat build, and add a
job that tests on the latest Swift release. Add Dependabot for GitHub
Actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bf8db34) to head (f8fc276).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #82   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         1297      1313   +16     
=========================================
+ Hits          1297      1313   +16     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dfed dfed changed the title Bring CodeQL and CI improvements over from SafeDI Improve CodeQL and CI resource usage and speed Oct 26, 2026
@dfed
dfed merged commit 57e0567 into main Oct 26, 2026
14 checks passed
@dfed
dfed deleted the dfed--claude/safedi-ci-wins-86d07c branch October 26, 2026 04:33
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.

1 participant