Skip to content

NFR 11: Continuous Integration (GitHub Actions) #21

Description

@itsniper

Goal

Add CI (GitHub Actions) to the project so that every push / PR runs the build, tests, lint, and docs generation. Currently there is no automated verification.

Context

See the investigation report at docs/investigations/swift6-concurrency-audit-2026-05-13.md, Preventive Measures section. The audit recommends several "shift-left" guardrails that only pay off when wired into CI:

  • swift build + swift test under -strict-concurrency=complete
  • SwiftLint custom rules banning @unchecked Sendable and @preconcurrency import outside Sources/ReliaBLEMock/
  • DocC build (swift package generate-documentation) so public-API renames break the docs build, not silent drift
  • (Future) test coverage reporting

Deliverable

  1. .github/workflows/ci.yml triggered on PRs and pushes to main:
    • Run swift build and swift test on macOS-15 (or latest, matching iOS 18+ / macOS 15+ targets).
    • Run SwiftLint with custom rules from the investigation report's Preventive Measures section.
    • Run swift package generate-documentation (see sub-issue) and fail on warnings.
  2. SwiftLint config (.swiftlint.yml) with the custom rules:
    custom_rules:
      no_unchecked_sendable:
        name: "@unchecked Sendable banned"
        regex: '@unchecked\s+Sendable'
        included: "Sources/ReliaBLE/.*\\.swift"
        severity: error
      no_preconcurrency_import:
        name: "@preconcurrency import banned"
        regex: '@preconcurrency\s+import'
        included: "Sources/ReliaBLE/.*\\.swift"
        severity: error
  3. Branch protection (manual step, document in this issue): require CI to pass on PRs to main.

Sub-issues

  • DocC build in CI (separate sub-issue tracked below).

Acceptance criteria

  • A green CI badge appears in README.md.
  • Opening a PR triggers all three checks (build/test, lint, docs) and they pass on the current main.
  • Branch protection enforces passing CI before merge to main.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions