Fastlane & CI/CD
Relevant source files
The following files were used as context for generating this wiki page:
The Fastlane and CI/CD infrastructure in the putio-ios project provides a standardized automation layer for building, testing, and distributing the application. It integrates local development workflows with GitHub Actions to ensure code quality through automated verification and facilitates seamless delivery to TestFlight and the App Store. Sources: fastlane/README.md, CONTRIBUTING.md:120-129, README.md:27-30
Fastlane Automation
Fastlane acts as the primary automation engine for the iOS project, managing tasks such as beta distribution and metadata management. The project uses a Ruby-based stack managed by Bundler, ensuring consistent environments for all contributors. Sources: fastlane/README.md, CLAUDE.md:3-5, CONTRIBUTING.md:10-14
Available Lanes
Currently, the primary defined lane for iOS is:
| Lane | Command | Description |
|---|---|---|
beta | fastlane ios beta | Handles beta archive builds and distribution. Passes PUTIO_* environment variables to Xcode. |
Sources: fastlane/README.md:16-20, CONTRIBUTING.md:112-113
CI/CD Workflows
The project utilizes GitHub Actions for continuous integration. The primary entry point for CI is the ci.yml workflow, which provides status badges for the main branch. Sources: README.md:16-17
Continuous Integration Flow
The following diagram illustrates the lifecycle of a code change from local development to CI verification.
Sources: CONTRIBUTING.md:52-60, README.md:16-17
Verification Matrix
Verification is categorized into three levels of confidence:
- Unit & Logic Coverage: Managed via
make verify, focusing on pure logic and model parsing. - SDK-Backed Flow: Managed via
make e2e-simulator, running mocked XCUITests against fixture-backed SDK responses. - Interactive Persistence: Managed via
make run-simulator, using signed builds to validate auth and keychain behavior.
Sources: CONTRIBUTING.md:52-64, CLAUDE.md:54-62
Testing and Mocking Infrastructure
A critical component of the CI/CD pipeline is the ability to run End-to-End (E2E) tests without relying on live network calls. This is achieved through a specialized mocking protocol. Sources: PutioE2EMockURLProtocol.swift:1-10
E2E Mocking Architecture
The system uses PutioE2EMockURLProtocol to intercept network requests to api.put.io when the PUTIO_E2E_MOCK_API environment variable is set to "1". Sources: PutioE2EMockURLProtocol.swift:6-12, PutioSDK.swift:15-18
Secret Management and Environment Configuration
The repository maintains a strict boundary between open-source code and private configuration. Sources: CONTRIBUTING.md:117-119
- Local Development: Uses
Config/Local.xcconfigfor secrets, which is gitignored. - Teammate Access: Uses 1Password CLI integration to materialize local config from templates.
- CI Environments: Relies on
OP_SERVICE_ACCOUNT_TOKENfor shared devboxes or CI runners to access necessary secrets. - Dynamic Config: Runtime app configuration flows through
Shared.xcconfig,Local.xcconfig, andInfo.plistplaceholders.
Sources: CONTRIBUTING.md:21-42, CLAUDE.md:37-44, CONTRIBUTING.md:109-113
Conclusion
The Fastlane and CI/CD system for putio-ios ensures that every contribution is verified through a tiered testing strategy, ranging from unit tests to fixture-backed E2E simulations. By leveraging Fastlane for distribution and GitHub Actions for automated quality gates, the project maintains a reliable release pipeline while keeping sensitive configuration secure via 1Password integration.