-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
language: objective-c | ||
osx_image: xcode10 | ||
|
||
before_install: | ||
- bundle install | ||
|
||
before_script: | ||
- bundle exec danger | ||
|
||
script: | ||
- .travis/build.sh | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
has_source_changes = !git.modified_files.grep(/Sources.*\.swift/).empty? || !git.added_files.grep(/Sources.*\.swift/).empty? | ||
has_tests_changes = !git.modified_files.grep(/Sources\/PageboyTests.*\.swift/).empty? || !git.added_files.grep(/Sources\/PageboyTests.*\.swift/).empty? | ||
|
||
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet | ||
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" | ||
|
||
# Warn when there is a big PR | ||
warn("This PR might be a little too big, consider breaking it up.") if git.lines_of_code > 500 | ||
|
||
# Require PR description | ||
warn "Please provide a summary in the PR description, it makes it easier to understand!" if github.pr_body.length < 5 | ||
|
||
# Check for source changes and prompt for test updates if non added. | ||
if (has_source_changes && ! has_tests_changes) | ||
warn("Looks like you changed some source files, should there have been some tests added?") | ||
end | ||
|
||
swiftlint.lint_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem "fastlane" | ||
gem "cocoapods" | ||
gem 'fastlane' | ||
gem 'cocoapods' | ||
gem 'danger' | ||
gem 'danger-swiftlint' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters