-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.1.0' into versions
- Loading branch information
Showing
129 changed files
with
112,828 additions
and
0 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,109 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main, versions] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
cancel-previous-runs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel previous runs of this workflow on same branch | ||
uses: rokroskar/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
anylint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Export latest tool versions | ||
run: | | ||
latest_version() { | ||
curl --silent "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | ||
} | ||
echo "::set-env name=ANYLINT_LATEST_VERSION::$( latest_version Flinesoft/AnyLint )" | ||
echo "::set-env name=SWIFT_SH_LATEST_VERSION::$( latest_version mxcl/swift-sh )" | ||
- name: AnyLint Cache | ||
uses: actions/cache@v1 | ||
id: anylint-cache | ||
with: | ||
path: anylint-cache | ||
key: ${{ runner.os }}-v1-anylint-${{ env.ANYLINT_LATEST_VERSION }}-swift-sh-${{ env.SWIFT_SH_LATEST_VERSION }} | ||
|
||
- name: Copy from cache | ||
if: steps.anylint-cache.outputs.cache-hit | ||
run: | | ||
sudo cp -f anylint-cache/anylint /usr/local/bin/anylint | ||
sudo cp -f anylint-cache/swift-sh /usr/local/bin/swift-sh | ||
- name: Install AnyLint | ||
if: steps.anylint-cache.outputs.cache-hit != 'true' | ||
run: | | ||
git clone https://github.com/Flinesoft/AnyLint.git | ||
cd AnyLint | ||
swift build -c release | ||
sudo cp -f .build/release/anylint /usr/local/bin/anylint | ||
- name: Install swift-sh | ||
if: steps.anylint-cache.outputs.cache-hit != 'true' | ||
run: | | ||
git clone https://github.com/mxcl/swift-sh.git | ||
cd swift-sh | ||
swift build -c release | ||
sudo cp -f .build/release/swift-sh /usr/local/bin/swift-sh | ||
- name: Copy to cache | ||
if: steps.anylint-cache.outputs.cache-hit != 'true' | ||
run: | | ||
mkdir -p anylint-cache | ||
cp -f /usr/local/bin/anylint anylint-cache/anylint | ||
cp -f /usr/local/bin/swift-sh anylint-cache/swift-sh | ||
- name: Cleanup checkouts | ||
run: rm -rf AnyLint && rm -rf swift-sh | ||
|
||
- name: Run AnyLint | ||
run: anylint | ||
|
||
swiftlint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run SwiftLint | ||
uses: norio-nomura/[email protected] | ||
with: | ||
args: --strict | ||
|
||
# Turned off until there's a final Swift 5.3 release on Ubuntu 18.04. | ||
# test-linux: | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# | ||
# - name: Run tests | ||
# run: swift test -v | ||
|
||
# Turned off until https://bugs.swift.org/browse/SR-12912 is fixed. | ||
# test-macos: | ||
# runs-on: macOS-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# | ||
# - uses: maxim-lobanov/[email protected] | ||
# with: | ||
# xcode-version: 12.0 | ||
# | ||
# - name: Run tests | ||
# run: swift test -v |
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
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,17 @@ | ||
@testable import PublicHolidaysTests | ||
@testable import Utility | ||
import XCTest | ||
|
||
// swiftlint:disable line_length file_length | ||
|
||
{% for type in types.classes|based:"XCTestCase" %} | ||
extension {{ type.name }} { | ||
static var allTests: [(String, ({{ type.name }}) -> () throws -> Void)] = [ | ||
{% for method in type.methods where method.parameters.count == 0 and method.shortName|hasPrefix:"test" and method|!annotated:"skipTestOnLinux" %} ("{{ method.shortName }}", {{ method.shortName }}){% if not forloop.last %},{% endif %} | ||
{% endfor %}] | ||
} | ||
|
||
{% endfor %} | ||
XCTMain([ | ||
{% for type in types.classes|based:"XCTestCase" %} testCase({{ type.name }}.allTests){% if not forloop.last %},{% endif %} | ||
{% endfor %}]) |
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,121 @@ | ||
# Basic Configuration | ||
opt_in_rules: | ||
- anyobject_protocol | ||
- array_init | ||
- attributes | ||
- closure_end_indentation | ||
- closure_spacing | ||
- collection_alignment | ||
- conditional_returns_on_newline | ||
- 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 | ||
- empty_xctest_method | ||
- explicit_init | ||
- explicit_type_interface | ||
- fallthrough | ||
- fatal_error_message | ||
- file_name | ||
- file_name_no_space | ||
- file_types_order | ||
- first_where | ||
- flatmap_over_map_reduce | ||
- function_default_parameter_at_end | ||
- identical_operands | ||
- implicit_return | ||
- implicitly_unwrapped_optional | ||
- indentation_width | ||
- joined_default_parameter | ||
- last_where | ||
- legacy_multiple | ||
- legacy_random | ||
- literal_expression_end_indentation | ||
- lower_acl_than_parent | ||
- missing_docs | ||
- modifier_order | ||
- multiline_arguments | ||
- multiline_arguments_brackets | ||
- multiline_literal_brackets | ||
- multiline_parameters | ||
- multiline_parameters_brackets | ||
- nslocalizedstring_key | ||
- object_literal | ||
- operator_usage_whitespace | ||
- optional_enum_case_matching | ||
- override_in_extension | ||
- pattern_matching_keywords | ||
- prefer_self_type_over_type_of_self | ||
- private_action | ||
- private_outlet | ||
- prohibited_super_call | ||
- reduce_into | ||
- redundant_nil_coalescing | ||
- redundant_type_annotation | ||
- single_test_class | ||
- sorted_first_last | ||
- sorted_imports | ||
- static_operator | ||
- strong_iboutlet | ||
- switch_case_on_newline | ||
- toggle_bool | ||
- trailing_closure | ||
- type_contents_order | ||
- unavailable_function | ||
- unneeded_parentheses_in_closure_argument | ||
- untyped_error_in_catch | ||
- unused_declaration | ||
- unused_import | ||
- vertical_parameter_alignment_on_call | ||
- vertical_whitespace_between_cases | ||
- vertical_whitespace_closing_braces | ||
- vertical_whitespace_opening_braces | ||
- xct_specific_matcher | ||
- yoda_condition | ||
|
||
included: | ||
- Sources | ||
- Tests | ||
|
||
excluded: | ||
- Tests/LinuxMain.swift | ||
|
||
disabled_rules: | ||
- todo | ||
- cyclomatic_complexity | ||
|
||
# Rule Configurations | ||
conditional_returns_on_newline: | ||
if_only: true | ||
|
||
explicit_type_interface: | ||
allow_redundancy: true | ||
excluded: | ||
- local | ||
|
||
file_name: | ||
suffix_pattern: "Ext" | ||
|
||
identifier_name: | ||
max_length: 60 | ||
excluded: | ||
- id | ||
- db | ||
- to | ||
|
||
line_length: | ||
warning: 160 | ||
ignores_comments: true | ||
|
||
nesting: | ||
type_level: 3 | ||
|
||
trailing_comma: | ||
mandatory_comma: true | ||
|
||
trailing_whitespace: | ||
ignores_comments: false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Oops, something went wrong.