Run tests in CI on Linux
Tests / test (push) Failing after 41s

Adds a Gitea Actions workflow running swift test in a swift:6.2 container.

The kit did not build without Apple frameworks, so the two files that need
them are wrapped in #if canImport, and the SwiftUI app target is added to
Package.swift only on macOS. Neither can exist in a Linux container.

This costs no coverage: all 43 tests are about file format and none touch
the Contacts or EventKit readers. The integration those readers represent
remains verifiable only on a Mac.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C5X1tYo9oxAfvoiFMh1QQr
This commit is contained in:
2026-08-08 20:26:29 -03:00
co-authored by Claude Opus 5
parent 7b9d16e442
commit e515277015
5 changed files with 74 additions and 11 deletions
+28
View File
@@ -0,0 +1,28 @@
name: Tests
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container:
# Pinned rather than tracking latest: a toolchain bump should be a commit,
# not a surprise on an unrelated push.
image: swift:6.2
steps:
- uses: actions/checkout@v4
- name: Toolchain
run: swift --version
# This only covers IPodSyncKit — the format logic, which is where every
# test lives. The Contacts and EventKit readers are compiled out on Linux
# and can only be exercised on a Mac.
- name: Build
run: swift build --build-tests
- name: Test
run: swift test