swift-ci-portability

Solid

Sets up GitHub Actions CI for Swift Package Manager projects (minimal macOS build+test workflow, Xcode/macOS version matrix, .build caching, runner image selection) and diagnoses/prevents environment-dependent Swift bugs that pass locally but fail on CI (JSONDecoder ISO8601 fractional seconds, NumberFormatter locale grouping, Date/timezone assumptions, locale-dependent string sorting, hardcoded paths, filesystem case-sensitivity, Bundle.module resource paths, Decimal/Double formatting). Use when asked for "swift CI", "GitHub Actions swift test", when "tests pass locally but fail on CI", or when debugging "locale" or "Foundation differences" between macOS/Xcode versions. Trigger with "/swift-ci-portability".

Code & Development 0 stars 0 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
0
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Swift CI & Portability ## Overview Two jobs, one skill: get a SwiftPM project onto GitHub Actions CI quickly, and stop (or diagnose) the specific class of bug where tests pass on a developer's Mac but fail on CI - or pass on one CI runner and fail on another. ## Prerequisites - A Swift Package Manager project (`Package.swift`) hosted on GitHub with Actions enabled. - `swift` toolchain locally for reproducing CI failures. ## When to use this - Setting up CI for a SwiftPM package/app for the first time. - A test suite is green locally but red on GitHub Actions (or red on one matrix row and green on another). - You're about to write code that touches dates, locales, number formatting, file paths, or bundled resources, and want to avoid known traps up front rather than debug them later. ## Instructions Setting up GitHub Actions CI: 1. Copy the template workflow into the repo: ```bash mkdir -p .github/workflows cp assets/ci.yml.template .github/workflows/ci.yml ``` 2. Open `.github/workflows/ci.yml` and adjust to the project: - **Runner image / Xcode version** - the `test` job pins one macOS/Xcode combination as the fast required check. Pick versions that match what your team actually develops against. Check currently available images and their preinstalled Xcode versions at https://github.com/actions/runner-images (search the macOS READMEs) before picking a runner label like `macos-14` or `macos-15`. - **Matrix rows*...

Details

Author
chsistrying
Repository
chsistrying/swift-ship-skills
Created
6 days ago
Last Updated
5 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category