Scripting in Swift For a Testable Build
summary
Claim: replace fragile bash build scripts with a tested Swift framework and an SPM-based executable that you invoke with swift run from a build phase. Implementation details: typed options structs, FileManager extensions, URLSession replacing curl, CommonCrypto for SHA checks, and unit tests with code coverage to validate file hashes and download/unzip logic. Demo generates Apollo GraphQL API.swift from schema+queries using a bundled Node CLI and the replacement workflow, and it works end-to-end.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:40What is GraphQL
- 6:38Why I hate Bash
- 8:30Building a Swift Framework
- 15:50Source Reference
- 18:07Caution
- 19:23A little dumb
- 20:05Swift project
- 30:03QA
related talks
44mAgile Swift
16mEffective Strategies for Testing and Releasing Server Side Changes
34mSwift Testing: A testing framework for modern Swift
30mUnlocking the Power of Swift Testing: Modern Approaches to Testing iOS Apps
36mTesting Asynchronous Code in Swift 5.5
25mAdopting a Test driven Mindset in the Workplace
30mScale-up iOS Automated UI Tests
32mVenturing Into the world of RxSwift unit testing
