-
Notifications
You must be signed in to change notification settings - Fork 0
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
34 changed files
with
2,411 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Prepare pull request to merge | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/**' | ||
- 'fastlane/**' | ||
- 'SoundModeManager/**' | ||
- 'SoundModeManagerTests/**' | ||
|
||
jobs: | ||
update_version: | ||
name: Update project version | ||
runs-on: macOS-latest | ||
timeout-minutes: 10 | ||
steps: | ||
|
||
- name: Checkout pull request branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Update Xcode and podspec version | ||
run: | | ||
bundle exec fastlane update_version | ||
run_tests: | ||
name: Build project and run tests | ||
runs-on: macOS-latest | ||
timeout-minutes: 30 | ||
steps: | ||
|
||
- name: Checkout pull request branch | ||
uses: actions/checkout@v2 | ||
|
||
- name: Select latest available version of Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest | ||
|
||
- name: Setup ruby and bundler | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Build project for iOS | ||
run: | | ||
bundle exec fastlane build_and_test | ||
check_pod_linter: | ||
name: Check Cocoa Pod linter | ||
runs-on: macOS-latest | ||
timeout-minutes: 10 | ||
steps: | ||
|
||
- name: Checkout pull request branch | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check Pod linter | ||
run: | | ||
pod lib lint |
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,31 @@ | ||
name: Pull request has already merged | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
jobs: | ||
create_tag: | ||
name: Create git tag based on project version | ||
if: ${{ github.event.pull_request.merged }} | ||
runs-on: macOS-latest | ||
timeout-minutes: 30 | ||
steps: | ||
|
||
- name: Checkout pull request branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
|
||
- name: Setup ruby and bundler | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Prepare project to deploy | ||
run: | | ||
bundle exec fastlane prepare_to_deploy |
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,24 @@ | ||
name: Prepare project and deploy to services | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
deploy_pod: | ||
name: Deploy to Cocoa Pods | ||
runs-on: macOS-latest | ||
timeout-minutes: 30 | ||
steps: | ||
|
||
- name: Checkout pull request branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
|
||
- name: Publish pod to trunk | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_PASSWORD }} | ||
run: | | ||
pod trunk push |
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
Binary file not shown.
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,123 @@ | ||
reporter: "xcode" | ||
|
||
# You can read more about rules | ||
# https://realm.github.io/SwiftLint/rule-directory.html | ||
|
||
warning_threshold: 15 | ||
|
||
# Disabled rules from runnig | ||
disabled_rules: | ||
- identifier_name | ||
- trailing_whitespace | ||
- cyclomatic_complexity | ||
- valid_ibinspectable | ||
|
||
# Opt in rules for runnig | ||
opt_in_rules: | ||
- closure_end_indentation | ||
- collection_alignment | ||
- contains_over_filter_count | ||
- contains_over_filter_is_empty | ||
- contains_over_first_not_nil | ||
- contains_over_range_nil_comparison | ||
- convenience_type | ||
- empty_collection_literal | ||
- empty_count | ||
- empty_string | ||
- explicit_init | ||
- fatal_error_message | ||
- file_name | ||
- file_name_no_space | ||
- first_where | ||
- implicit_return | ||
- joined_default_parameter | ||
- last_where | ||
- literal_expression_end_indentation | ||
- multiline_literal_brackets | ||
- operator_usage_whitespace | ||
- overridden_super_call | ||
- prefer_zero_over_explicit_init | ||
- redundant_type_annotation | ||
- sorted_first_last | ||
- toggle_bool | ||
- unneeded_parentheses_in_closure_argument | ||
- untyped_error_in_catch | ||
- yoda_condition | ||
|
||
# Paths to ignore during linting. Takes precedence over `included`. | ||
excluded: | ||
- Pods | ||
- Jodle/Resources/R.generated.swift | ||
- Chat | ||
- DerivedData | ||
|
||
# Configured length rules | ||
line_length: | ||
warning: 170 | ||
ignores_comments: true | ||
|
||
type_body_length: | ||
warning: 300 | ||
error: 400 | ||
|
||
function_body_length: | ||
warning: 60 | ||
error: 100 | ||
|
||
file_length: | ||
warning: 500 | ||
error: 800 | ||
ignore_comment_only_lines: true | ||
|
||
type_name: | ||
min_length: 3 | ||
max_length: | ||
warning: 50 | ||
error: 60 | ||
|
||
# Configured rules | ||
colon: | ||
apply_to_dictionaries: false | ||
|
||
nesting: | ||
type_level: 2 | ||
|
||
empty_count: | ||
severity: warning | ||
only_after_dot: true | ||
|
||
# Configure custom_rules | ||
custom_rules: | ||
final_class: | ||
severity: warning | ||
name: "Every class must have \"final\" modifier" | ||
message: "Add \"final\" modifier otherwise add the prefix \"Base\" to the class name or mark it as \"internal\" if this class will be overridden." | ||
regex: "^(class) (?!Base)" | ||
included: ".*.swift" | ||
|
||
mark_style: | ||
severity: warning | ||
name: "Use \"// MARK: - <Name>\" instead \"// MARK: <Name>\"" | ||
regex: "MARK: [^-]{1}" | ||
match_kinds: | ||
- comment | ||
included: ".*.swift" | ||
|
||
mark_newlines: | ||
severity: warning | ||
message: "Every \"MARK: -\" should be surrounded with newline before and after" | ||
regex: "(([a-zA-Z0-9_}{)]+[ \t]*\n{1}[ \t]*)([\/]{2} MARK: - [a-zA-Z0-9 ]*))|(([\/]{2} MARK: - [a-zA-Z0-9 ]*)([\n]{1}[ \t]*[a-zA-z0-9_]+))" | ||
included: ".*.swift" | ||
|
||
mark_extensions: | ||
severity: warning | ||
message: "Every extension group should have \"MARK: - <Name>\" with name of this extension below" | ||
regex: "([}]+[\t]*\n{1}[ \t]*)(?![\/]{2} MARK: - [a-zA-Z0-9 ]*)([\n]+[ \t]*)(extension [a-zA-Z0-9_]+:)" | ||
included: ".*.swift" | ||
|
||
empty_closure_params: | ||
included: ".*.swift" | ||
name: "Empty closure should be avoided" | ||
regex: "[{]([\n\t ]*_ in[\n\t ]*)[}]" | ||
message: "Use optional closures instead" | ||
severity: warning |
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,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "fastlane" |
Oops, something went wrong.