Skip to content

Commit f595893

Browse files
committed
Merge branch 'development' into cleanupSwift
# Conflicts: # Example/Podfile.lock
2 parents ce54a3b + df61329 commit f595893

17 files changed

Lines changed: 406 additions & 44 deletions

File tree

.circleci/config.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,36 @@ jobs:
2828
- run:
2929
name: Build and run tests
3030
command: xcodebuild test -project MessageKit.xcodeproj -scheme MessageKitTests -destination "$DESTINATION" CODE_SIGNING_REQUIRED=NO | xcpretty -c
31+
- restore_cache:
32+
name: Restore bundle cache
33+
keys:
34+
- 1-gems-{{ arch }}-{{ .Branch }}-{{ checksum "Example/Gemfile.lock" }}
35+
- 1-gems-{{ arch }}-{{ .Branch }}-
36+
- run:
37+
name: Install bundle
38+
command: cd Example && bundle check || bundle install --path vendor/bundle
39+
- save_cache:
40+
name: Save bundle cache
41+
key: 1-gems-{{ arch }}-{{ .Branch }}-{{ checksum "Example/Gemfile.lock" }}
42+
paths:
43+
- vendor/bundle
3144
- restore_cache:
3245
name: Restore Pods cache
3346
keys:
34-
- v1-pods-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Example/Podfile.lock" }}
35-
- v1-pods-cache-{{ arch }}-{{ .Branch }}-
36-
# - run:
37-
# name: Fetch CocoaPods Specs
38-
# command: curl -sS https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash
47+
- v1-pods-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Example/Podfile.lock" }}
48+
- v1-pods-cache-{{ arch }}-{{ .Branch }}-
3949
- run:
4050
name: Update Pods
41-
command: cd Example && pod install
51+
command: cd Example && bundle exec pod install
4252
- save_cache:
4353
name: Save Pods cache
4454
paths:
45-
- Pods
55+
- Pods
4656
key: v1-pods-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Example/Podfile.lock" }}
4757
- run:
4858
name: Build and analyze Example
4959
command: xcodebuild build analyze -workspace Example/ChatExample.xcworkspace -scheme ChatExample -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | xcpretty -c
5060

51-
# Run tests.
52-
#- run:
53-
# name: Run tests
54-
# command: fastlane scan
55-
# environment:
56-
# SCAN_DEVICE: iPhone 6
57-
# SCAN_SCHEME: WebTests
58-
5961
# Collect XML test results data to show in the UI,
6062
# and save the same XML files under test-results folder
6163
# in the Artifacts tab.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Example app
2+
3+
on: pull_request
4+
5+
jobs:
6+
tests:
7+
name: Build Example app
8+
runs-on: macOS-latest
9+
steps:
10+
- name: Checkout the Git repository
11+
uses: actions/checkout@v2
12+
- name: Cache Pods
13+
uses: actions/cache@v1
14+
with:
15+
path: Pods
16+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Example/Podfile.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-pods-
19+
- name: Cache SPM
20+
uses: actions/cache@v1
21+
with:
22+
path: .build
23+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Example/Gemfile.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-gems-
26+
- name: Build and run example project
27+
run: ./GitHubActions/build.sh example
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR Framework
2+
3+
on: pull_request
4+
5+
jobs:
6+
tests:
7+
name: Build Framework
8+
runs-on: macOS-latest
9+
steps:
10+
- name: Checkout the Git repository
11+
uses: actions/checkout@v2
12+
- name: Cache Carthage
13+
uses: actions/cache@v1
14+
with:
15+
path: Carthage
16+
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
17+
restore-keys: |
18+
${{ runner.os }}-carthage-
19+
- name: Build framework
20+
run: ./GitHubActions/build.sh framework

.github/workflows/ci_pr_tests.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR Tests
2+
3+
on: pull_request
4+
5+
jobs:
6+
tests:
7+
name: Run Tests
8+
runs-on: macOS-latest
9+
steps:
10+
- name: Checkout the Git repository
11+
uses: actions/checkout@v2
12+
- name: Cache Carthage
13+
uses: actions/cache@v1
14+
with:
15+
path: Carthage
16+
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
17+
restore-keys: |
18+
${{ runner.os }}-carthage-
19+
- name: Build and run tests
20+
run: ./GitHubActions/build.sh tests

.github/workflows/danger.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ on: pull_request
55
jobs:
66
danger:
77
name: Run Danger
8-
runs-on: ubuntu-latest
8+
runs-on: macOS-latest
99
steps:
1010
- name: Checkout the Git repository
1111
uses: actions/checkout@v2
12-
- name: Setup Ruby
13-
uses: actions/setup-ruby@v1
12+
- name: Cache Gems
13+
uses: actions/cache@v1
1414
with:
15-
ruby-version: '2.6'
15+
path: vendor/bundle
16+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-gems-
1619
- name: Run build script
1720
run: gem install bundler && bundle install && bundle exec danger --fail-on-errors=true
1821
env:

.swiftlint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ custom_rules:
1313
severity: warning # violation severity. optional.
1414
opt_in_rules:
1515
- explicit_top_level_acl
16-
explicit_acl: error
1716
explicit_top_level_acl: error
1817
included:
19-
- Sources
18+
- Sources

Dangerfile

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
1-
# MessageKit, 2020
1+
#
2+
# MIT License
3+
#
4+
# Copyright (c) 2017-2020 MessageKit
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
223

324
# This runs on CI
425
mergeable_state = github.pr_json["mergeable_state"]
526

627
# Make it more obvious that a PR a draft
728
if mergeable_state == "draft"
8-
warn("PR is marked as Draft")
29+
warn("PR is marked as Draft")
930
end
1031

1132
# Mainly to encourage writing up some reasoning about the PR, rather than just leaving a title
1233
if github.pr_body.length < 5
13-
fail("Please provide a summary in the Pull Request description")
34+
fail("Please provide a summary in the Pull Request description")
1435
end
1536

1637
declared_hashtag = github.pr_title.include?("#trivial")
1738
hasChangelogEntry = git.modified_files.include?("CHANGELOG.md")
1839
if !hasChangelogEntry && !declared_hashtag
19-
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/MessageKit/MessageKit/blob/master/CHANGELOG.md).")
40+
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/MessageKit/MessageKit/blob/master/CHANGELOG.md).")
2041
end
2142

2243
# Warn when there is a big PR
2344
if git.lines_of_code > 1000
24-
warn("Big Pull Request - Please consider splitting up your changes into smaller Pull Requests.")
45+
warn("Big Pull Request - Please consider splitting up your changes into smaller Pull Requests.")
2546
end
2647

2748
swiftlint.config_file = '.swiftlint.yml'
28-
swiftlint.lint_files inline_mode:true
29-
swiftlint.lint_files fail_on_error:true
49+
swiftlint.lint_files inline_mode:true, fail_on_error:true

Example/ChatExample.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@
523523
);
524524
runOnlyForDeploymentPostprocessing = 0;
525525
shellPath = /bin/sh;
526-
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
526+
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\"\n";
527527
};
528528
/* End PBXShellScriptBuildPhase section */
529529

Example/Gemfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# MIT License
3+
#
4+
# Copyright (c) 2017-2020 MessageKit
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
24+
source 'https://rubygems.org'
25+
gem 'cocoapods', '~> 1.9'

Example/Gemfile.lock

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.2)
5+
activesupport (4.2.11.1)
6+
i18n (~> 0.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
algoliasearch (1.27.1)
11+
httpclient (~> 2.8, >= 2.8.3)
12+
json (>= 1.5.1)
13+
atomos (0.1.3)
14+
claide (1.0.3)
15+
cocoapods (1.9.0)
16+
activesupport (>= 4.0.2, < 5)
17+
claide (>= 1.0.2, < 2.0)
18+
cocoapods-core (= 1.9.0)
19+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
20+
cocoapods-downloader (>= 1.2.2, < 2.0)
21+
cocoapods-plugins (>= 1.0.0, < 2.0)
22+
cocoapods-search (>= 1.0.0, < 2.0)
23+
cocoapods-stats (>= 1.0.0, < 2.0)
24+
cocoapods-trunk (>= 1.4.0, < 2.0)
25+
cocoapods-try (>= 1.1.0, < 2.0)
26+
colored2 (~> 3.1)
27+
escape (~> 0.0.4)
28+
fourflusher (>= 2.3.0, < 3.0)
29+
gh_inspector (~> 1.0)
30+
molinillo (~> 0.6.6)
31+
nap (~> 1.0)
32+
ruby-macho (~> 1.4)
33+
xcodeproj (>= 1.14.0, < 2.0)
34+
cocoapods-core (1.9.0)
35+
activesupport (>= 4.0.2, < 6)
36+
algoliasearch (~> 1.0)
37+
concurrent-ruby (~> 1.1)
38+
fuzzy_match (~> 2.0.4)
39+
nap (~> 1.0)
40+
netrc (~> 0.11)
41+
typhoeus (~> 1.0)
42+
cocoapods-deintegrate (1.0.4)
43+
cocoapods-downloader (1.3.0)
44+
cocoapods-plugins (1.0.0)
45+
nap
46+
cocoapods-search (1.0.0)
47+
cocoapods-stats (1.1.0)
48+
cocoapods-trunk (1.4.1)
49+
nap (>= 0.8, < 2.0)
50+
netrc (~> 0.11)
51+
cocoapods-try (1.1.0)
52+
colored2 (3.1.2)
53+
concurrent-ruby (1.1.6)
54+
escape (0.0.4)
55+
ethon (0.12.0)
56+
ffi (>= 1.3.0)
57+
ffi (1.12.2)
58+
fourflusher (2.3.1)
59+
fuzzy_match (2.0.4)
60+
gh_inspector (1.1.3)
61+
httpclient (2.8.3)
62+
i18n (0.9.5)
63+
concurrent-ruby (~> 1.0)
64+
json (2.3.0)
65+
minitest (5.14.0)
66+
molinillo (0.6.6)
67+
nanaimo (0.2.6)
68+
nap (1.1.0)
69+
netrc (0.11.0)
70+
ruby-macho (1.4.0)
71+
thread_safe (0.3.6)
72+
typhoeus (1.3.1)
73+
ethon (>= 0.9.0)
74+
tzinfo (1.2.6)
75+
thread_safe (~> 0.1)
76+
xcodeproj (1.15.0)
77+
CFPropertyList (>= 2.3.3, < 4.0)
78+
atomos (~> 0.1.3)
79+
claide (>= 1.0.2, < 2.0)
80+
colored2 (~> 3.1)
81+
nanaimo (~> 0.2.6)
82+
83+
PLATFORMS
84+
ruby
85+
86+
DEPENDENCIES
87+
cocoapods (~> 1.9)
88+
89+
BUNDLED WITH
90+
2.1.4

0 commit comments

Comments
 (0)