Skip to content

Latest commit

 

History

History
98 lines (73 loc) · 2.71 KB

File metadata and controls

98 lines (73 loc) · 2.71 KB

CI/CD Setup Documentation

This document explains the Continuous Integration and Continuous Deployment setup for the swift-ui-debug-scan project.

Workflows

1. Main CI Workflow (.github/workflows/ci.yml)

Triggers: Pull requests and pushes to main branch Purpose: Run tests and build validation across multiple platforms

Test Matrix:

  • macOS: Tests on macOS 13 (Xcode 15.4/Swift 5.9) and macOS 14 (Xcode 16.1/Swift 6.0)
  • iOS Simulator: iPhone 15 on iOS 17.5 and 18.1
  • tvOS Simulator: Apple TV on tvOS 18.1
  • watchOS Simulator: Apple Watch Series 10 on watchOS 11.1
  • visionOS Simulator: Apple Vision Pro on visionOS 2.1

Features:

  • Swift Package Manager caching for faster builds
  • Code coverage collection (macOS only) with lcov export
  • Parallel testing where supported
  • Upload to Codecov for coverage reporting
  • Verbose testing with SWIFTUI_DEBUG_SCAN_VERBOSE=1

2. Package Validation Workflow (.github/workflows/ci.yml - validate job)

Purpose: Validate Swift package structure and dependencies

Checks:

  • Package.swift syntax validation
  • Dependency resolution verification
  • Dependency tree analysis

3. Release Workflow (.github/workflows/release.yml)

Triggers: Git tags (any tag pattern) Purpose: Automated releases when tags are pushed

Features:

  • Full validation (build + test) before release
  • Source archive creation
  • Release notes extraction from CHANGELOG.md
  • GitHub release creation with artifacts
  • Prerelease detection (alpha, beta, rc tags)

Configuration Files

Dependabot (.github/dependabot.yml)

Purpose: Automated dependency updates Features:

  • Weekly Swift package updates
  • Weekly GitHub Actions updates
  • Proper labeling and commit message formatting
  • Controlled PR limits

Code Coverage (codecov.yml)

Purpose: Coverage reporting configuration Features:

  • Project coverage target: 80%
  • Patch coverage target: 80%
  • Test files excluded from coverage
  • Branch detection for conditionals and loops

Environment Variables Used

  • SWIFTUI_DEBUG_SCAN_VERBOSE: Enables verbose test logging
  • GITHUB_TOKEN: For GitHub API access (automatic)

Usage

Running Tests Locally

swift test --verbose
SWIFTUI_DEBUG_SCAN_VERBOSE=1 swift test

Building Release Version

swift build --configuration release

Creating a Release

  1. Update CHANGELOG.md with release notes
  2. Create and push a git tag:
    git tag v1.0.0
    git push origin v1.0.0
  3. GitHub Actions will automatically create the release

Monitoring and Maintenance

  • CI Status: Monitor via GitHub Actions tab
  • Coverage: Check Codecov reports on PRs
  • Dependencies: Dependabot will create PRs for updates