From 30d359bd4cf94a6023cb1d8c4db292bb83f5fbb3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 05:16:50 +0000 Subject: [PATCH 1/3] CI: add build & test job and CI status badge (#21) Adds the build/test pillar of the CI pipeline alongside the existing DocC gate: a `build-test` job runs `swift build` and `swift test` on macos-15 (Xcode 16.4), on every PR and push to master. Tests run against the ReliaBLEMock target, so no real CoreBluetooth hardware is required. Also adds a CI status badge to the README. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AGygGSiuD4mh8b8rYkZR4A --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cc556e..8875e54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,31 @@ permissions: contents: read jobs: + build-test: + name: Build & Test + runs-on: macos-15 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - name: Select Xcode + run: | + if [ ! -d /Applications/Xcode_16.4.app ]; then + echo "Xcode 16.4 not found. Installed Xcode versions:" + ls /Applications | grep Xcode || true + exit 1 + fi + sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer + + - name: Verify Swift version + run: swift --version + + - name: Build + run: swift build + + - name: Test + run: swift test + docc: name: DocC catalog runs-on: macos-15 diff --git a/README.md b/README.md index c5c796c..8865794 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ReliaBLE +[![CI](https://github.com/Five3Apps/ReliaBLE/actions/workflows/ci.yml/badge.svg)](https://github.com/Five3Apps/ReliaBLE/actions/workflows/ci.yml) + Modern library for handling BLE connections, with a focus on reliability. ## Installation From 15e98b949c7ded7a6fc1a460b2d85d77d9be1813 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 05:29:48 +0000 Subject: [PATCH 2/3] TEMP: add intentional failing test to verify CI badge fail state This commit will be reverted; it exists only to confirm CI and the status badge correctly report a failing state before restoring green. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AGygGSiuD4mh8b8rYkZR4A --- Tests/ReliaBLETests/CIBadgeFailProbe.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Tests/ReliaBLETests/CIBadgeFailProbe.swift diff --git a/Tests/ReliaBLETests/CIBadgeFailProbe.swift b/Tests/ReliaBLETests/CIBadgeFailProbe.swift new file mode 100644 index 0000000..7b4186e --- /dev/null +++ b/Tests/ReliaBLETests/CIBadgeFailProbe.swift @@ -0,0 +1,15 @@ +// +// CIBadgeFailProbe.swift +// ReliaBLETests +// +// TEMPORARY: intentionally-failing test used to verify that CI (and the CI +// status badge) correctly report a FAILING state. This file is reverted +// before the PR is finalized — the final state of the PR must be green. +// + +import Testing + +@Test("CI badge fail-case probe (intentional failure — will be reverted)") +func ciBadgeFailProbe() { + #expect(Bool(false), "Intentional failure to exercise the CI failure path.") +} From d8bf5c7a9a718784142d812ceca9faa79af20a08 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 05:32:00 +0000 Subject: [PATCH 3/3] Revert intentional CI-badge fail probe; restore green Removes the temporary failing test added to verify CI/badge failure reporting. Final PR state is passing. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AGygGSiuD4mh8b8rYkZR4A --- Tests/ReliaBLETests/CIBadgeFailProbe.swift | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 Tests/ReliaBLETests/CIBadgeFailProbe.swift diff --git a/Tests/ReliaBLETests/CIBadgeFailProbe.swift b/Tests/ReliaBLETests/CIBadgeFailProbe.swift deleted file mode 100644 index 7b4186e..0000000 --- a/Tests/ReliaBLETests/CIBadgeFailProbe.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// CIBadgeFailProbe.swift -// ReliaBLETests -// -// TEMPORARY: intentionally-failing test used to verify that CI (and the CI -// status badge) correctly report a FAILING state. This file is reverted -// before the PR is finalized — the final state of the PR must be green. -// - -import Testing - -@Test("CI badge fail-case probe (intentional failure — will be reverted)") -func ciBadgeFailProbe() { - #expect(Bool(false), "Intentional failure to exercise the CI failure path.") -}