This an example implementation of your CI jobs runner built with Swiftlane package.
This repo is just a minimal example showing how to get started with Swiftlane. We suggest you to check the code base of Swiftlane repo to get a better understanding what you can do with it.
Simple CI job named test-calculator
defined in UnitTestsLaneCommand.swift which will:
- Build and run unit tests
- Check for build errors
- Check for build warnings
- Check Coverage limits per Target (what percent of each target is covered)
- Check Coverage limits for changed lines (what percent of changed lines is covered)
- Produce a nice looking
report.md
in theExamples
directory - In-code sample configs for all the tasks above
A bash script to run the job (Examples/simple_ci_job.sh) which will:
- Clone and build
xcbeautify
&xclogparser
intoExamples/deps
- Build and run
SwiftlaneCI
After the run you will find a few artifacts inside Examples/swiftlane_builds
subdirectories:
derived_data
- derived datalogs
:system
- simulator logstest
- xcodebuild logs
results
:*.xcresult
- Xcode produced build & test results (which you can always open on another machine)xclogparser_report.json
- json build report generated by xclogperserbuild_report_html
- html build report generated by xclogperserxccov_report.json
- code coverage info generated by xccov_merged_result.junit
- JUnit unit testing report
Clone this repo:
$ git clone https://github.com/swiftlane-code/SwiftlaneCI
$ cd SwiftlaneCI
Try running the example CI job script:
$ cd Examples
$ ./simple_ci_job.sh
The best way to customize the runner is to make a fork or a so-called private fork of this repo and modify it as you wish.
Review the configs at UnitTestsLaneCommand+Configs.swift
& SharedConfigFactory.swift
and change them to suit your needs.
Swiftlane is an open-source project, and we welcome contributions from anyone who is interested in improving it. Whether you want to fix a bug, add a new feature, or just help with the documentation, we would love to have your help.
To contribute to Swiftlane, you can fork the repository, make your changes, and submit a pull request. We will review your changes and merge them if they meet our quality standards.
Keep in mind that this particular repo is kind of a starting scratch for everyone who is willing to build their CI jobs with Swiftlane.
Swiftlane is licensed under the Apache License 2.0.