0Pricing
Swift Academy · Lesson

CI basics with swift test and artifacts

Set up a simple CI flow: checkout → build → test → package → upload . Learn basic commands, caching tips, and how to produce release artifacts.

What CI does

Your CI should run on every push and tag:

  • Build & Test with SwiftPM
  • Create release artifacts
  • Upload on tags

SUT for tests

CI will build the package and run tests against your code (SUT). Keep functions small and testable.

// Example SUT and testable logic used by CI.
// In real projects, this lives in Sources/ and Tests/.
// Here we only show the code idea.

public struct Math {
    public static func add(_ a: Int, _ b: Int) -> Int { a + b }
}

print("Demo SUT ready: Math.add(2,3) =", Math.add(2,3)) // 5

All lessons in this course

  1. Library vs executable packages
  2. Semantic versioning & tagging releases
  3. CI basics with swift test and artifacts
← Back to Swift Academy