Skip to content

Commit

Permalink
Preparing for Combine (#4)
Browse files Browse the repository at this point in the history
* Update to Xcode 12.5.1

* Extend Store for Combine

* Finish

* Activate CI

* Another CI try

* Fix Pod validations

* Fix swiftlint.yml file path
  • Loading branch information
sebastianvarela authored Aug 11, 2021
1 parent de0b128 commit 794bf88
Show file tree
Hide file tree
Showing 62 changed files with 7,389 additions and 1,009 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "build-and-tests"
on:
pull_request:

jobs:
discard_runnings_workflows:
name: Discard running workflows
runs-on: ubuntu-20.04
steps:

- name: Cancel running workflows
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build:
name: Check build & tests
runs-on: apps-ci
needs: discard_runnings_workflows
timeout-minutes: 120
steps:

- name: Remove any previous hook 🥸
run: rm -rf .git/hooks

- name: Checkout 🔎
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache for Gems 💎
uses: actions/[email protected]
with:
path: |
.gems
~/.bundle
key: ${{ runner.os }}-cache-gems-${{ hashFiles('**/Gemfile.lock') }}

- name: Cache for Carthage 🚚
uses: actions/[email protected]
with:
path: |
Carthage
key: ${{ runner.os }}-cache-carthage-${{ hashFiles('**/Cartfile.resolved') }}

- name: Rake ⚙️
run: rake

- name: Run all tests ⚙️
run: rake tests

- name: Validate Podfile ⚙️
run: rake validate_podfile

- name: Danger 🚨
run: bundle exec danger
if: github.event_name == 'pull_request'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.THORBOT_GITHUB_API_TOKEN }}

- name: Save Output 📦
uses: actions/upload-artifact@v2
with:
name: output
path: output
78 changes: 64 additions & 14 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,121 @@
disabled_rules:
- inclusive_language
- todo
- conditional_returns_on_newline
- unused_optional_binding
- file_header
- unused_setter_value
opt_in_rules:
#lint
- prohibited_super_call
- overridden_super_call
- yoda_condition
- modifier_order
- anyobject_protocol
- unused_import
#- explicit_acl
- cyclomatic_complexity
#style
- sorted_imports
- duplicate_imports
- unneeded_parentheses_in_closure_argument
- operator_usage_whitespace
- number_separator
- closure_spacing
- closure_end_indentation
- attributes
- file_header
- conditional_returns_on_newline
- implicit_return
- explicit_self
- multiline_function_chains
- switch_case_on_newline
- prefer_self_type_over_type_of_self
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- vertical_parameter_alignment
- vertical_parameter_alignment_on_call
#idiomatic
- redundant_type_annotation
- redundant_nil_coalescing
- nimble_operator
- explicit_init
- empty_parentheses_with_trailing_closure
- prefer_zero_over_explicit_init
#performance
- empty_count
- contains_over_first_not_nil
- empty_string
- first_where
- sorted_first_last
- flatmap_over_map_reduce
included:
- Sources
excluded:
- Tests
closure_end_indentation:
severity: error
force_cast:
severity: error
force_try:
severity: error
function_parameter_count:
warning: 6
error: 6
function_body_length:
warning: 60
error: 100
warning: 120
error: 200
cyclomatic_complexity:
warning: 60
error: 60
type_body_length:
warning: 400
error: 500
warning: 1500
error: 1500
line_length:
warning: 250
error: 400
large_tuple:
warning: 3
error: 3
file_length:
warning: 700
error: 1200
warning: 2000
error: 2000
type_name:
min_length: 3
max_length: 40
max_length: 50
excluded:
- iPhone
- my
- BO
- bo
severity: error
identifier_name:
min_length: 3
max_length: 40
severity: error
excluded:
- id
max_length: 45
excluded:
- i
- to
- x
- y
- z
- a
- b
- rx
- map
- app
- id
- URL
- GlobalAPIKey
- bo
- BO
severity: error
attributes:
always_on_line_above:
- "@discardableResult"
- "@available"
always_on_same_line:
- "@autoclosure"
- "@IBOutlet"
- "@IBAction"
- "@NSManaged"
- "@testable"
reporter: "xcode"
reporter: "xcode"
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Brewfile

This file was deleted.

2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 5.0
github "ReactiveX/RxSwift" ~> 6.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "5.1.1"
github "ReactiveX/RxSwift" "6.2.0"
1 change: 1 addition & 0 deletions DangerFile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ end

#SWIFTLINT
swiftlint.lint_all_files = true
swiftlint.config_file = '.swiftlint.yml'
swiftlint.lint_files fail_on_error: true

#TEST EVOLUTION CHECK:
Expand Down
Loading

0 comments on commit 794bf88

Please sign in to comment.