-
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.
Merge pull request #22 from farshadmb/develop
Release
- Loading branch information
Showing
128 changed files
with
11,054 additions
and
238 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI Testing | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
|
||
repository_dispatch: | ||
types: [test] | ||
pull_request: | ||
branches: | ||
- develop | ||
- feature/* | ||
- feature/*/* | ||
- bugfix/* | ||
- hotfix/* | ||
- master | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
test: | ||
name: Run Unit Test | ||
runs-on: macOS-latest | ||
strategy: | ||
matrix: | ||
devices: ["iPhone 8 (11.4)","iPhone SE (12.4)","iPhone X (13.6)","iPad Air (11.4)","iPad Air 2 (12.4)","iPad Pro (10.5-inch) (13.6)"] | ||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@v1 | ||
- name: Install Dependencies | ||
run: | | ||
bundle install --verbose | ||
bash <(curl -s https://raw.githubusercontent.com/TitouanVanBelle/XCTestHTMLReport/master/install.sh) | ||
bundle exec pod install | ||
# env: | ||
# BUNDLE_GITHUB__COM: x-access-token:${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} | ||
- name: Installing iOS Simulators | ||
run: | | ||
hostname | ||
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes | ||
sudo ln -s /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime | ||
sudo ln -s /Applications/Xcode_11.6.app//Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 13.6.simruntime | ||
bundle exec xcversion simulators --install="iOS 11.4 Simulator" --verbose | ||
echo "Installed iOS Simulators" | ||
- name: Creating iOS Simulators | ||
run: | | ||
xcrun simctl create "iPhone 8" com.apple.CoreSimulator.SimDeviceType.iPhone-8 com.apple.CoreSimulator.SimRuntime.iOS-11-4 | ||
xcrun simctl create "iPhone SE" com.apple.CoreSimulator.SimDeviceType.iPhone-SE com.apple.CoreSimulator.SimRuntime.iOS-12-4 | ||
xcrun simctl create "iPhone X" com.apple.CoreSimulator.SimDeviceType.iPhone-X "com.apple.CoreSimulator.SimRuntime.iOS-13-6" | ||
xcrun simctl create "iPad Air" com.apple.CoreSimulator.SimDeviceType.iPad-Air "com.apple.CoreSimulator.SimRuntime.iOS-11-4" | ||
xcrun simctl create "iPad Air 2" com.apple.CoreSimulator.SimDeviceType.iPad-Air-2 "com.apple.CoreSimulator.SimRuntime.iOS-12-4" | ||
xcrun simctl create "iPad Pro (10.5-inch)" com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch- "com.apple.CoreSimulator.SimRuntime.iOS-13-6" | ||
echo "Created iOS Simulators" | ||
- name: Build and test on Device | ||
run: | | ||
echo "Destination => ${destination}" | ||
bundle exec fastlane run_ci_tests device:"${destination}" clean:true --verbose | ||
env: | ||
destination: ${{ matrix.devices }} | ||
|
||
- name: Archive Failed Tests artifacts | ||
if: failure() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: FailureDiff | ||
path: fastlane/test_output | ||
|
||
- name: Archive Success Tests artifacts | ||
if: success() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: SuccessDiff | ||
path: fastlane/test_output | ||
|
||
|
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,96 @@ | ||
disabled_rules: | ||
- line_length | ||
- valid_docs | ||
- type_body_length | ||
- operator_whitespace | ||
- statement_position | ||
- trailing_whitespace | ||
- nesting | ||
- cyclomatic_complexity | ||
- function_parameter_count | ||
- vertical_parameter_alignment | ||
- comma | ||
- control_statement | ||
|
||
opt_in_rules: | ||
# - function_body_length | ||
- colon | ||
- type_name | ||
- closure_spacing | ||
- redundant_nil_coalescing | ||
# - attributes | ||
- operator_usage_whitespace | ||
- closure_end_indentation | ||
- first_where | ||
- object_literal | ||
- number_separator | ||
- fatal_error_message | ||
# - missing_docs | ||
|
||
excluded: # paths to ignore during linting. Takes precedence over `included`. | ||
- Carthage | ||
- Pods | ||
- build | ||
|
||
force_cast: warning | ||
force_try: warning | ||
force_unwrapping: error | ||
|
||
number_separator: | ||
minimum_length: 5 | ||
|
||
function_body_length: | ||
max_length: | ||
warning: 75 | ||
error : 150 | ||
min_length: | ||
warning: 0 | ||
|
||
variable_name: | ||
max_length: | ||
warning: 40 | ||
error: 50 | ||
min_length: | ||
error: 3 | ||
excluded: | ||
- row | ||
- key | ||
- id | ||
- url | ||
- uri | ||
- URI | ||
- URL | ||
- in | ||
- to | ||
- vc | ||
- vw | ||
- red | ||
- rgb | ||
- GlobalAPIKey | ||
- up | ||
- x | ||
- y | ||
|
||
custom_rules: | ||
empty_first_line: # from https://github.com/brandenr/swiftlintconfig | ||
name: "Empty First Line" | ||
regex: '(^[ a-zA-Z ]*(?:protocol|extension|class|struct) (?!(?:var|let))[ a-zA-Z:]*\{\n *\S+)' | ||
message: "There should be an empty line after a declaration" | ||
severity: warning | ||
empty_line_after_guard: # from https://github.com/brandenr/swiftlintconfig | ||
name: "Empty Line After Guard" | ||
regex: '(^ *guard[ a-zA-Z0-9=?.\(\),><!]*\{[ a-zA-Z0-9=?.\(\),><!]*\}\n *(?!(?:return|guard))\S+)' | ||
message: "There should be an empty line after a guard" | ||
severity: error | ||
unnecessary_type: # from https://github.com/brandenr/swiftlintconfig | ||
name: "Unnecessary Type" | ||
regex: '[ a-zA-Z0-9]*(?:let|var) [ a-zA-Z0-9]*: ([a-zA-Z0-9]*)[\? ]*= \1' | ||
message: "Type Definition Not Needed" | ||
severity: error | ||
double_space: # from https://github.com/IBM-Swift/Package-Builder | ||
include: "*.swift" | ||
name: "Double space" | ||
regex: '([a-z,A-Z] \s+)' | ||
message: "Double space between keywords" | ||
match_kinds: keyword | ||
severity: warning |
Oops, something went wrong.