Skip to content

Commit 6bf4f51

Browse files
committed
Adding travis support
1 parent 7ccbba0 commit 6bf4f51

33 files changed

+409
-1171
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
# Xcode
12
**/xcuserdata/**
3+
4+
# AppCode
5+
.idea/
6+
7+
# CocoaPods
8+
Pods/

.travis.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# references:
2+
# * https://www.objc.io/issues/6-build-tools/travis-ci/
3+
# * https://github.com/supermarin/xcpretty#usage
4+
5+
matrix:
6+
include:
7+
- osx_image: xcode10.1
8+
env: DESTINATION="iPad Pro (11-inch) (12.1)" SWIFT_VERSION="4.2"
9+
10+
- osx_image: xcode10
11+
env: DESTINATION="iPhone XS (12.0)" SWIFT_VERSION="4.2"
12+
13+
- osx_image: xcode9.4
14+
env: DESTINATION="iPhone X (11.4)" SWIFT_VERSION="4.0"
15+
16+
- osx_image: xcode9.3
17+
env: DESTINATION="iPhone 8 (11.0.1)" SWIFT_VERSION="4.0"
18+
19+
- osx_image: xcode9.2
20+
env: DESTINATION="iPhone 7 Plus (10.3.1)" SWIFT_VERSION="4.0"
21+
22+
- osx_image: xcode9.1
23+
env: DESTINATION="iPhone 6s Plus (9.3)" SWIFT_VERSION="4.0"
24+
25+
- osx_image: xcode9
26+
env: DESTINATION="iPhone 6 Plus (8.4)" SWIFT_VERSION="4.0"
27+
28+
language: objective-c
29+
cache: cocoapods
30+
podfile: Example/Podfile
31+
before_install:
32+
- gem install cocoapods # Since Travis is not always on latest version
33+
- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
34+
- pod install --repo-update --project-directory=Example
35+
# Grepping destination device udid
36+
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
37+
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
38+
# (not working with osx_image: xcode10 and newer?)
39+
#- open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID
40+
script:
41+
- set -o pipefail && xcodebuild test
42+
`` -enableCodeCoverage YES
43+
`` -workspace Example/CollectionViewCenteredFlowLayout.xcworkspace
44+
`` -scheme Example
45+
`` -sdk iphonesimulator
46+
`` -destination "id=$DESTINATION_UDID"
47+
`` ONLY_ACTIVE_ARCH=NO
48+
`` | xcpretty
49+
- echo $SWIFT_VERSION > .swift-version
50+
- pod lib lint

CollectionViewCenteredFlowLayout.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.screenshots = 'https://raw.githubusercontent.com/coeur/CollectionViewCenteredFlowLayout/master/screenshot.png'
1414
s.license = { :type => "MIT", :file => "LICENSE" }
1515
s.authors = { 'Antoine Cœur' => '' }
16-
s.social_media_url = 'http://twitter.com/adigitalknight'
16+
s.social_media_url = 'https://twitter.com/adigitalknight'
1717
s.platform = :ios, '8.0'
1818
s.source = { :git => 'https://github.com/coeur/CollectionViewCenteredFlowLayout.git', :tag => version }
1919
s.source_files = 'CollectionViewCenteredFlowLayout/*.swift'

CollectionViewCenteredFlowLayout/CollectionViewCenteredFlowLayout.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Copyright (c) 2017 Cœur
32
//
43
// Permission is hereby granted, free of charge, to any person obtaining a copy of

Example/.swiftlint.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Find all the available rules by running:
2+
# Pods/SwiftLint/swiftlint rules
3+
4+
included:
5+
- ../CollectionViewCenteredFlowLayout
6+
- .
7+
8+
excluded:
9+
- Carthage
10+
- Pods
11+
12+
disabled_rules:
13+
- line_length
14+
- file_length
15+
- force_cast
16+
- force_try
17+
- comma
18+
- trailing_comma
19+
20+
opt_in_rules:
21+
#performance:
22+
- empty_count
23+
- empty_string
24+
- first_where
25+
- last_where
26+
#lint:
27+
- overridden_super_call
28+
- prohibited_super_call
29+
- yoda_condition
30+
- unused_import
31+
- unused_private_declaration
32+
#idiomatic:
33+
- redundant_nil_coalescing
34+
- fatal_error_message
35+
- nimble_operator
36+
#style:
37+
- operator_usage_whitespace
38+
- number_separator
39+
- switch_case_on_newline
40+
- closure_spacing
41+
- conditional_returns_on_newline
42+
- unneeded_parentheses_in_closure_argument
43+
- vertical_parameter_alignment_on_call
44+
- implicit_return
45+
- collection_alignment
46+
47+
vertical_whitespace:
48+
max_empty_lines: 2
49+
trailing_whitespace:
50+
ignores_empty_lines: true
51+
ignores_comments: true
52+
identifier_name:
53+
min_length: 1

0 commit comments

Comments
 (0)