Skip to content

Commit

Permalink
Add fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetmandm committed Jun 3, 2017
1 parent 8965a8d commit 066eea5
Show file tree
Hide file tree
Showing 9 changed files with 492 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: objective-c
osx_image: xcode8.3
xcode_project: Example-ionicons/Example-ionicons.xcodeproj
xcode_scheme: Example-ioniconsTests
xcode_sdk: iphonesimulator

before_install:
- gem update fastlane

script:
- fastlane test
1 change: 1 addition & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
app_identifier "com.tinfish.ionicons" # The bundle identifier of your app
13 changes: 13 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fastlane_version "2.36.0"

default_platform :ios

platform :ios do
desc "Runs all the tests"
lane :test do
scan(
project: "ionicons/ionicons.xcodeproj",
scheme: "ionicons"
)
end
end
43 changes: 43 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
fastlane documentation
================
# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```
xcode-select --install
```

## Choose your installation method:

<table width="100%" >
<tr>
<th width="33%"><a href="http://brew.sh">Homebrew</a></td>
<th width="33%">Installer Script</td>
<th width="33%">Rubygems</td>
</tr>
<tr>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS</td>
<td width="33%" align="center">macOS or Linux with Ruby 2.0.0 or above</td>
</tr>
<tr>
<td width="33%"><code>brew cask install fastlane</code></td>
<td width="33%"><a href="https://download.fastlane.tools">Download the zip file</a>. Then double click on the <code>install</code> script (or run it in a terminal window).</td>
<td width="33%"><code>sudo gem install fastlane -NV</code></td>
</tr>
</table>

# Available Actions
## iOS
### ios test
```
fastlane ios test
```
Runs all the tests

----

This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
23 changes: 23 additions & 0 deletions fastlane/report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="fastlane.lanes">




<testcase classname="fastlane.lanes" name="0: Verifying required fastlane version" time="0.001511">

</testcase>


<testcase classname="fastlane.lanes" name="1: default_platform" time="0.001199">

</testcase>


<testcase classname="fastlane.lanes" name="2: scan" time="8.941462">

</testcase>

</testsuite>
</testsuites>
237 changes: 237 additions & 0 deletions fastlane/test_output/report.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test Results | xcpretty</title>
<style type="text/css">
body { font-family:Avenir Next, Helvetica Neue, sans-serif; color: #4A4A4A; background-color: #F0F3FB; margin:0;}
h1 { font-weight: normal; font-size: 24px; margin: 10px 0 0 0;}
h3 { font-weight: normal; margin: 2px; font-size: 1.1em;}
header { position: fixed;width: 100%;background: rgba(249, 254, 255, 0.9);margin: 0;padding: 10px;}
header:before, header:after { content:""; display:table;}
header:after { clear:both;}
a:link { color: #A1D761;}
footer { clear: both;position: relative;z-index: 10;height: 40px;margin-top: -10px; margin-left:30px; font-size:12px;}
table { width:100%; border-collapse: collapse;}
tr td:first-child { width:7%}
.left { float: left; margin-left:30px;}
.right { float: right; margin-right: 40px; margin-top: 0; margin-bottom:0;}
.test-suite { margin: 0 0 30px 0;}
.test-suite > .heading { font-family:Menlo, Monaco, monospace; font-weight: bold; border-color: #A1D761; background-color: #B8E986; border-width: 1px;}
.test-suite.failing > .heading { border-color: #C84F5E; background-color: #E58591;}
.test-suite > .heading > .title { margin-top: 4px; margin-left: 10px;}
.tests { overflow: scroll;margin: 0 30px 0 60px;}
.test, .test-suite > .heading { height: 30px; overflow: hidden; margin: 0 30px;}
.test, .test-suite > .heading { border-width: 1px; border-collapse: collapse; border-style: solid; }
.test { margin-left: 30px; border-top:none;}
.test.failing { border-color: #C84F5E; background-color: #F4DDE0;}
.test.passing { border-color: #A1D761;}
.test.failing { background-color: #E7A1AA;}
.test.passing { background-color: #CAF59F;}
.test.failing.odd { background-color: #EEC7CC;}
.test.passing.odd { background-color: #E5FBCF;}
.details { background-color: #F4DDE0; border: 1px solid #C84F5E;}
.test .test-detail:last-child { padding-bottom: 8px;}
.test .title { float: left; font-size: 0.9em; margin-top: 8px; font-family: Menlo, Monaco, monospace;}
.test .time { float: left;margin: 4px 10px 0 20px;}
.test-detail { font-family:Menlo, Monaco, monospace; font-size: 0.9em; margin: 5px 0 5px 0px;}
.screenshots { height: auto; overflow: hidden; padding: 4px 4px 0 4px; background-color: #B8E986; border: #A1D761; border-width: 0 1px; border-style: solid; }
.screenshots.failing { border-color: #C84F5E; background-color: #E58591; }
.screenshot { max-height: 60px; float: left; transition: max-height 0.2s; margin: 0 4px 4px 0 }
.screenshot.selected { max-height: 568px; }
#test-suites { display: inline-block; width: 100%;margin-top:100px;}
#segment-bar { margin-top: 10px;margin-left: 14px;float:right;}
#segment-bar a:first-child { border-radius: 9px 0 0 9px; border-right: none;}
#segment-bar a:last-child { border-radius: 0 9px 9px 0; border-left: none;}
#segment-bar > a { color: #565656; border: 2px solid #7B7B7B; width: 80px; font-weight: bold; display:inline-block;text-align:center; font-weight: normal;}
#segment-bar > a.selected { background-color: #979797; color: #F0F3FB;}
#counters { float: left;margin: 10px;text-align: right;}
#counters h2 { font-size: 16px; font-family: Avenir, sans-serif; font-weight: lighter; display:inline;}
#counters .number { font-size: 20px;}
#fail-count { color: #D0021B; margin-left:10px;}
@media (max-width: 640px) {
h1, #counters, #segment-bar { margin: 5px auto; text-align:center;}
header, #segment-bar { width: 100%; position: relative; background:none;}
.left, .right { float:none; margin:0;}
#test-suites { margin-top: 0;}
#counters { float:none;}
}
</style>
<script type="text/javascript">
var hide = function(element) { element.style.display = 'none';}
var show = function(element) { element.style.display = '';}
var isHidden = function(element) { return element.style.display == 'none';}
var isSelected = function(element) { return element.classList.contains("selected");}
var deselect = function(element) { return element.classList.remove("selected");}
var select = function(element) { return element.classList.add("selected");}
var toggle = function(element) { isHidden(element) ? show(element) : hide(element);};
var toggleTests = function(heading) { toggle(heading.parentNode.children[1]);};
var toggleDetails = function(detailClass) {
var details = document.querySelectorAll('.' + detailClass);
for (var i = details.length - 1; i >= 0; i--) { toggle(details[i]);};
};
var hideAll = function(collection) {
for (var i = collection.length - 1; i >= 0; i--) { hide(collection[i]); };
}
var showAll = function(collection) {
for (var i = collection.length - 1; i >= 0; i--) { show(collection[i]); };
}
var selectSegment = function(segment) {
if (isSelected(segment)) return;
var segments = document.querySelectorAll('#segment-bar > a');
for (var i = segments.length - 1; i >= 0; i--) { deselect(segments[i]);};
select(segment);
if (segment.id == "all-segment") {
showAll(document.querySelectorAll('.test-suite'));
showAll(document.querySelectorAll('.test'));
} else if (segment.id == "failing-segment") {
hideAll(document.querySelectorAll('.test.passing'));
showAll(document.querySelectorAll('.test.failing'));
hideAll(document.querySelectorAll('.test-suite.passing'));
showAll(document.querySelectorAll('.test-suite.failing'));
} else if (segment.id == "passing-segment") {
hideAll(document.querySelectorAll('.test.failing'));
showAll(document.querySelectorAll('.test.passing'));
hideAll(document.querySelectorAll('.test-suite.failing'));
showAll(document.querySelectorAll('.test-suite.passing'));
}
}
var toggleScreenshot = function(suiteName, index) {
var screenshot = document.getElementById("screenshot-" + suiteName + "-" + index);
isSelected(screenshot) ? deselect(screenshot) : select(screenshot);
}
</script>
</head>
<body>
<header>
<section class="left">
<h1>Test Results</h1>
</section>
<section class="right">
<section id="counters">
<h2 id="test-count"><span class="number">9</span> tests</h2>

</section>
<section id="segment-bar">
<a id="all-segment" onclick="selectSegment(this);" class="selected">All</a><a id="failing-segment" onclick="selectSegment(this);">Failing</a><a id="passing-segment" onclick="selectSegment(this);">Passing</a>
</section>
</section>
</header>
<section id="test-suites">


<section class="test-suite passing" id="Example_ioniconsTests">
<section class="heading" onclick="toggleTests(this);">
<h3 class="title">Example_ioniconsTests</h3>
</section>
<section class="tests">

<table>


<tr class="test passing " onclick="toggleDetails('testBadNamesReturnNoGlyphs');">
<td>

<h3 class="time">0.015s</h3>

</td>
<td><h3 class="title">testBadNamesReturnNoGlyphs</h3></td>
</tr>



<tr class="test passing odd" onclick="toggleDetails('testDefaultImageColor');">
<td>

<h3 class="time">0.011s</h3>

</td>
<td><h3 class="title">testDefaultImageColor</h3></td>
</tr>



<tr class="test passing " onclick="toggleDetails('testForValidFontName');">
<td>

<h3 class="time">0.001s</h3>

</td>
<td><h3 class="title">testForValidFontName</h3></td>
</tr>



<tr class="test passing odd" onclick="toggleDetails('testIconNamesReturnGlyphs');">
<td>

<h3 class="time">0.018s</h3>

</td>
<td><h3 class="title">testIconNamesReturnGlyphs</h3></td>
</tr>



<tr class="test passing " onclick="toggleDetails('testImageColor');">
<td>

<h3 class="time">0.004s</h3>

</td>
<td><h3 class="title">testImageColor</h3></td>
</tr>



<tr class="test passing odd" onclick="toggleDetails('testImageForNonNil');">
<td>

<h3 class="time">0.003s</h3>

</td>
<td><h3 class="title">testImageForNonNil</h3></td>
</tr>



<tr class="test passing " onclick="toggleDetails('testThatIconAndImageSizeAreDistinct');">
<td>

<h3 class="time">0.003s</h3>

</td>
<td><h3 class="title">testThatIconAndImageSizeAreDistinct</h3></td>
</tr>



<tr class="test passing odd" onclick="toggleDetails('testThatImageIsRenderedAtSize');">
<td>

<h3 class="time">0.002s</h3>

</td>
<td><h3 class="title">testThatImageIsRenderedAtSize</h3></td>
</tr>



<tr class="test passing " onclick="toggleDetails('testThatSizeAllowsNonSquare');">
<td>

<h3 class="time">0.001s</h3>

</td>
<td><h3 class="title">testThatSizeAllowsNonSquare</h3></td>
</tr>


</table>
</section>
</section>

</section>
<footer>Report generated with <a href="https://github.com/supermarin/xcpretty">xcpretty</a></footer>
</body>
</html>
14 changes: 14 additions & 0 deletions fastlane/test_output/report.junit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<testsuites name='ioniconsTests.xctest' tests='9' failures='0'>
<testsuite name='Example_ioniconsTests' tests='9' failures='0'>
<testcase classname='Example_ioniconsTests' name='testBadNamesReturnNoGlyphs' time='0.015'/>
<testcase classname='Example_ioniconsTests' name='testDefaultImageColor' time='0.011'/>
<testcase classname='Example_ioniconsTests' name='testForValidFontName' time='0.001'/>
<testcase classname='Example_ioniconsTests' name='testIconNamesReturnGlyphs' time='0.018'/>
<testcase classname='Example_ioniconsTests' name='testImageColor' time='0.004'/>
<testcase classname='Example_ioniconsTests' name='testImageForNonNil' time='0.003'/>
<testcase classname='Example_ioniconsTests' name='testThatIconAndImageSizeAreDistinct' time='0.003'/>
<testcase classname='Example_ioniconsTests' name='testThatImageIsRenderedAtSize' time='0.002'/>
<testcase classname='Example_ioniconsTests' name='testThatSizeAllowsNonSquare' time='0.001'/>
</testsuite>
</testsuites>
Loading

0 comments on commit 066eea5

Please sign in to comment.