Swiftpack.co - buildkite/test-collector-swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by buildkite.
buildkite/test-collector-swift v0.1.1
Buildkite Test Analytics collector for Swift XCTest
⭐️ 5
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/buildkite/test-collector-swift.git", from: "v0.1.1")

Buildkite Test Collector for Swift (Beta)

Official Buildkite Test Analytics collector for Swift test frameworks ✨

⚒ Supported test frameworks: XCTest, and more coming soon.

📦 Supported CI systems: Buildkite, GitHub Actions, CircleCI, and others via the BUILDKITE_ANALYTICS_* environment variables.

👉 Installing

Step 1

Create a test suite, and copy the API token that it gives you.

Swift Package Manager

To use the Buildkite Test Collector with a SwiftPM project, add this repository to the Package.swift manifest and add BuildkiteTestCollector to any test target requiring analytics:

let package = Package(
  name: "MyProject",
  dependencies: [
    .package(url: "https://github.com/buildkite/test-collector-swift", from: "0.1.1")
  ],
  targets: [
    .target(name: "MyProject"),
    .testTarget(
      name: "MyProjectTests",
      dependencies: [
        "MyProject",
        .product(name: "BuildkiteTestCollector", package: "test-collector-swift")
      ]
    )
  ]
)

Step 2

Set the BUILDKITE_ANALYTICS_TOKEN secret on your CI to the API token from earlier.

Step 3

Push your changes to a branch, and open a pull request. After a test run has been triggered, results will start appearing in your analytics dashboard.

git checkout -b add-buildkite-test-analytics
git commit -am "Add Buildkite Test Analytics"
git push origin add-buildkite-test-analytics

🔍 Debugging

To enable debugging output, set the BUILDKITE_ANALYTICS_DEBUG_ENABLED environment variable to true.

🔜 Roadmap

See the GitHub 'enhancement' issues for planned features. Pull requests are always welcome, and we’ll give you feedback and guidance if you choose to contribute 💚

👩‍💻 Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite/test-collector-swift

📜 License

The package is available as open source under the terms of the MIT License.

GitHub

link
Stars: 5
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

0.1.1
1 week ago

What's Changed

  • Fixed: Readme instructions
  • Fixed: Typo in upload endpoint
  • Tech: Output to stderr while loading instead of printing asynchronously
  • Tech: Removed ApiClient's dependency on URLSession

Full Changelog: https://github.com/buildkite/test-collector-swift/compare/v0.1.0...v0.1.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics