mirror of
https://github.com/jayanezj/traccar-client-macos.git
synced 2026-11-04 23:00:45 +01:00
[GH-ISSUE #2] Enable early GitHub Actions builds and incremental automated testing #1
Reference in new issue
Block a user
Originally created by @jayanezj on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/jayanezj/traccar-client-macos/issues/2
Originally assigned to: @jayanezj on GitHub.
Goal
Establish CI with the first buildable application, before location and transport implementation, and extend it as each feature lands.
Scope
.github/workflows/ci.yml. Run on pull requests and pushes tomain, with optional manual dispatch.pull_request_targetaccess.mainfrom merging a failing required build/test check when repository settings are authorized.Acceptance criteria
CI is introduced immediately after PROTO-001; later implementation does not wait until packaging to receive automated feedback.
Both build/toolchain combinations are verified and recorded. Missing runner/toolchain availability remains an explicit unresolved criterion, never a silently skipped green job.
A deliberately broken build and, once available, a failing real test make CI fail. Restoring them makes the checks pass.
Fork PRs can run the unprivileged checks under GitHub's applicable approval policy without production secrets.
Every subsequent feature PR adds or updates relevant tests and wires its suite into this workflow where automation is meaningful.
Before repository authorization, only local workflow files/commands can be prepared and validated; remote runs and branch protection remain unverified until executed later.
Validation
Validate workflow structure and the same build/test commands locally first. After explicit authorization to create/use the repository, record successful and intentionally failing PR runs, main-branch triggers and required-check configuration. CI does not replace real-Mac permission, sleep, battery or Gatekeeper checks.
Repository use is authorized. Hosted PR runs and the active main ruleset have been verified. The automatic
pushtrigger onmainwas verified after merging PR #22: run 40007519170 passed all three checks for merge commit8aaff37d7aeb0f52c0beefbe0ffcbea4771f4a40.Hosted evidence
Post-merge push to main: SwiftLint, both Debug/Release matrix builds and binary/signature checks passed for the merge commit.
Initial matrix success.
Deliberate lint/build failure: expected exit 2/65, PR blocked and failure diagnostics uploaded.
Restoration success: all checks pass; restored tree matches the initial implementation.
Fork PR #23, run 40005555955: first-time contributor execution required approval; after approval, all three checks passed. Each job reports
Contents: read,Metadata: readandSecret source: None.Five of the six criteria are verified: the first four have hosted execution evidence, and the historical authorization criterion is satisfied by the authorized repository, hosted runs and active branch ruleset. The future-test criterion remains unchecked as an ongoing obligation, not a claim that future PRs have already been verified.
Ongoing test commitment
Every subsequent feature PR must add or update meaningful tests for its behaviour and run them through this CI workflow in the same change. Review must verify that the suite executes and failures block integration. Configuration tests begin in #3 with a real test target and shared test command; validate a deliberately failing real test and its restoration when that target exists. Do not add placeholder tests. Keep physical-Mac checks explicit where automation is not meaningful.
Post-merge
pushvalidation onmainhas passed. This issue is closed after that verification; the ongoing test commitment remains in force for subsequent feature PRs.References
Dependencies
@jayanezj commented on GitHub (Oct 23, 2026):
Implement CI on
feature/2-github-actions-ciwith an arm64 build matrix:xcode-27using Xcode 27.1 (27A9275), andmacos-15using Xcode 26.3 (17C529). Both retain deployment target macOS 15.0. The preview runner image is accepted for the initial CI; the selected compiler is a final release.Add pinned SwiftLint checks alongside Debug and Release compilation. This stage has no test target; meaningful tests will be added with the corresponding features, starting with configuration in #3. SonarQube Community is excluded because official Swift analysis requires Developer Edition. Dependency-Track integration is deferred until external dependencies are introduced.
@jayanezj commented on GitHub (Oct 23, 2026):
The CI workflow defines three stable checks:
SwiftLint,Build (primary)andBuild (macOS 15). Both build jobs compile Debug and Release, verify the selected runner/toolchain, and check arm64 binaries, deployment target 15.0 and application signatures. The workflow uses read-only repository permissions, SHA-pinned Actions, non-persistent checkout credentials, bounded timeouts, cancellation of superseded runs and seven-day retention for failure logs with local paths replaced.Local validation on macOS 27.0.1 arm64 with Xcode 27.1 (27A9275) and SDK 27.0:
#errorfailed compilation with exit 65. The original sources then passed lint and Debug compilation again.xcode-27label, which its runner catalog does not yet recognize.Hosted execution of both matrix entries, actual PR/main triggers, fork approval behaviour and required-check configuration remain unverified. There is no test target at this stage; configuration tests will be added in #3. Acceptance criteria requiring hosted runs remain open.
@jayanezj commented on GitHub (Oct 23, 2026):
Enabled the active repository ruleset Protect main for
refs/heads/main. Changes require a pull request; branch deletion and force pushes are blocked. The bypass list is empty, and the ruleset reports that the current account cannot bypass it. No external approval is required for the single-maintainer workflow.Required CI checks will be configured after the first hosted executions establish and validate the check names.
@jayanezj commented on GitHub (Oct 23, 2026):
Added
scripts/check-local.shas a single pre-push validation command, with documentedprimaryandmacos15profiles. It verifies the selected toolchain, shell syntax, staged/unstaged tracked-file whitespace, SwiftLint, Debug and Release compilation, arm64 binaries, deployment target 15.0 and signatures. It stops at the first failure. Binary verification is shared with the hosted workflow throughscripts/verify-build.sh.The complete primary-profile run passed locally with Xcode 27.1. Invalid arguments and a macos15 profile on a macOS 27 host correctly return nonzero. README instructions explain external output directories, Xcode selection and the distinction between local checks, hosted execution and manual application validation.
@jayanezj commented on GitHub (Oct 23, 2026):
PR #22 has a successful hosted CI run for commit
744e349:SwiftLint: zero violations.Build (primary): macOS 27.0.1 arm64, Xcode 27.1 (27A9275), SDK 27.0; Debug/Release and binary/signature checks passed.Build (macOS 15): macOS 15.7.9 arm64, Xcode 26.3 (17C529), SDK 26.2; Debug/Release and binary/signature checks passed.All three checks are now required by the active main ruleset and must originate from GitHub Actions. The branch must be up to date; PR-only integration, force-push/deletion protection and an empty bypass list are preserved.
The first two acceptance criteria are verified. Hosted deliberate-failure/restoration testing, actual fork PR behaviour and the main push trigger remain unverified; negative lint/build checks have passed locally only.
@jayanezj commented on GitHub (Oct 23, 2026):
Hosted failure/restoration validation completed on PR #22:
86a6dd5: run 40004871786 failed SwiftLint with the expected trailing-whitespace violation (exit 2) and both build jobs with the deliberate#error(exit 65). The PR reportedmergeStateStatus: BLOCKEDwithout attempting a merge.a7435b4: run 40005084222 passed SwiftLint and both Debug/Release build jobs, including binary/signature verification. Its tree is identical to the original implementation commit744e349; GitHub verifies both test commits' signatures.The third acceptance criterion is verified for this build-only stage. A failing real test remains conditional on the test target added in #3. The fork PR criterion remains open until a real cross-repository run is verified.
@jayanezj commented on GitHub (Oct 23, 2026):
The fourth acceptance criterion is verified by fork PR #23 and its own CI run 40005555955, originating from
codigojose/traccar-client-macoswith actorcodigojose. The initial run required approval under the unchangedfirst_time_contributorspolicy; the approved attempt passed all three checks. Every job reports read-only Contents/Metadata permissions andSecret source: None.All four build-stage acceptance criteria now have hosted evidence. The test-only PR was closed without merging; PR #22 remains the implementation PR. Ongoing feature-test integration remains in Scope, while the main push trigger is explicitly recorded as post-merge verification. No real test target exists yet; its negative test validation becomes applicable in #3.
@jayanezj commented on GitHub (Oct 23, 2026):
Correction to the previous completion summary: the original acceptance checklist contains six criteria. All six are restored in Acceptance criteria; the first four retain their verified status and evidence, and the two original remaining criteria remain unchecked. No criteria have been waived. The hosted failure/restoration and fork results are unchanged.
@jayanezj commented on GitHub (Oct 23, 2026):
The historical authorization criterion is now checked: repository use is authorized, hosted success/failure/restoration/fork runs have been verified, and main has active PR-only protection with required GitHub Actions checks and no bypass.
The future-test criterion remains an ongoing commitment: each subsequent feature PR must add or update meaningful tests and execute them in CI in the same change, starting with configuration in #3. A deliberately failing real test and its restoration will be verified when that test target exists.
PR #22 uses
Refs #2without a closing keyword. Keep this issue open through integration, verify the first successfulpushrun on main, and then close it explicitly.@jayanezj commented on GitHub (Oct 23, 2026):
PR #22 is merged as
8aaff37d7aeb0f52c0beefbe0ffcbea4771f4a40. The automatic push-to-main CI run 40007519170 completed successfully for that exact merge commit:SwiftLint: zero violations.Build (primary): Xcode 27.1 (27A9275), SDK 27.0, macOS 27.0.1; Debug/Release and binary/signature verification passed.Build (macOS 15): Xcode 26.3 (17C529), SDK 26.2, macOS 15.7.9; Debug/Release and binary/signature verification passed.This completes post-merge validation of the main push trigger. The local main checkout matches origin/main and is clean.
The six original acceptance texts are preserved. The future-test criterion remains an ongoing commitment, starting with the real configuration test target in #3; future PR compliance is not being asserted in advance. Closing this infrastructure issue after successful main validation.