Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feature/TDP-197402
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-michaelbrown committed Nov 8, 2024
2 parents b5a44db + ddc05a3 commit 9990699
Show file tree
Hide file tree
Showing 1,247 changed files with 1,566 additions and 67,543 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/artifactory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: ['[0-9]+.[0-9]+.[0-9]+']

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
artifactory:
Expand All @@ -18,15 +18,14 @@ jobs:
- name: Install dependencies
run: brew install jfrog-cli
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build documentation
run: |
make docs open="no" DERIVED_DATA_PATH="$(mktemp -d)"
mkdir Documentation
mv .build/documentation/archive/Nodes.doccarchive Documentation
- name: Archive
run: >
tar -czf "Nodes-${GITHUB_REF_NAME}.tar.gz" Sources Documentation
run: tar -czf "Nodes-${GITHUB_REF_NAME}.tar.gz" Sources Documentation
- name: Upload
run: >
jf rt u
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
branches: [ main ]

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
docc:
name: DocC
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
run: make docs open="no" DERIVED_DATA_PATH="$(mktemp -d)"
11 changes: 5 additions & 6 deletions .github/workflows/genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
genesis:
Expand All @@ -21,7 +21,7 @@ jobs:
brew install mint xcodegen needle mockolo
mint install yonaskolb/genesis
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create temporary directory
id: mktemp
run: echo "directory=$(mktemp -d)" >> "$GITHUB_OUTPUT"
Expand All @@ -41,9 +41,8 @@ jobs:
run: swift package resolve
- name: Lint
working-directory: ${{ steps.mktemp.outputs.directory }}
run: |
DIRECTORY_NAME=$(echo "${PWD##*/}" | tr '[:upper:]' '[:lower:]')
"$(find ".build/artifacts/${DIRECTORY_NAME}" -type f -name swiftlint -perm +111 -print -quit)" \
run: >
"$(find ".build/artifacts/swiftlint" -type f -name swiftlint -perm +111 -print -quit)"
lint --strict --reporter github-actions-logging
- name: Resolve package dependencies
working-directory: ${{ steps.mktemp.outputs.directory }}
Expand All @@ -55,7 +54,7 @@ jobs:
build-for-testing
-scheme "Tinder"
-destination "name=$SIMULATOR,OS=latest"
SWIFT_TREAT_WARNINGS_AS_ERRORS=YES
-skipPackagePluginValidation
- name: Test
working-directory: ${{ steps.mktemp.outputs.directory }}
run: >
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ on:
branches: [ main ]

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
lint:
name: Lint
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download swiftlint binary
run: swift package resolve
- name: Lint
run: |
DIRECTORY_NAME=$(echo "${PWD##*/}" | tr '[:upper:]' '[:lower:]')
"$(find ".build/artifacts/${DIRECTORY_NAME}" -type f -name swiftlint -perm +111 -print -quit)" \
run: >
"$(find ".build/artifacts/swiftlint" -type f -name swiftlint -perm +111 -print -quit)"
lint --strict --reporter github-actions-logging
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: ['[0-9]+.[0-9]+.[0-9]+']

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
pages:
Expand All @@ -23,7 +23,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Configure pages
uses: actions/configure-pages@v2
- name: Build documentation
Expand Down
29 changes: 3 additions & 26 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,16 @@ on:
branches: [ main ]

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
SWIFT_STRICT_CONCURRENCY: complete
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
swift:
name: Swift
runs-on: macos-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Validate excluded snapshots
run: |
SNAPSHOTS=$(find Tests -type d -name "__Snapshots__" | sort)
EXCLUDED=$(swift package dump-package | jq -r '.targets[] | select(.type == "test") | "Tests/" + .name + "/" + .exclude[]' | sort)
UNEXCLUDED=$(comm -23 <(echo "$SNAPSHOTS") <(echo "$EXCLUDED"))
if test -n "$UNEXCLUDED"
then
echo "::error::Snapshot directories must be excluded from Swift package:" >&2
echo "$UNEXCLUDED" >&2
exit 1
fi
uses: actions/checkout@v4
- name: Build
run: swift build -v -Xswiftc -warnings-as-errors
run: swift build -v
- name: Test
run: swift test -v
- name: Delete snapshots
run: make delete-snapshots
- name: Record snapshots
run: swift test -v
continue-on-error: true
- name: Validate recorded snapshots
run: test -z "$(git status --porcelain)"
- name: Validate executables
run: |
swift run -- nodes-code-gen --help
swift run -- nodes-xcode-templates-gen --help
6 changes: 3 additions & 3 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

jobs:
xcode:
Expand All @@ -17,7 +17,7 @@ jobs:
SIMULATOR: iPhone 14
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Resolve package dependencies
run: xcodebuild -resolvePackageDependencies
- name: Build
Expand All @@ -26,7 +26,7 @@ jobs:
build-for-testing
-scheme "Nodes-Package"
-destination "name=$SIMULATOR,OS=latest"
SWIFT_TREAT_WARNINGS_AS_ERRORS=YES
-skipPackagePluginValidation
- name: Test
run: >
xcodebuild
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@
# Xcode
*.xcworkspace/
*.xcodeproj/

# Codegen
**/Generated/

# Bazel
bazel-*
9 changes: 9 additions & 0 deletions .swiftlint-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ only_rules:
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
# - contrasted_opening_brace
- control_statement
- convenience_type
- custom_rules
Expand Down Expand Up @@ -73,6 +74,7 @@ only_rules:
- file_name
- file_name_no_space
- file_types_order
- final_test_case
- first_where
- flatmap_over_map_reduce
- for_where
Expand Down Expand Up @@ -124,11 +126,13 @@ only_rules:
- multiple_closures_with_trailing_closure
- nesting
- nimble_operator
# - no_empty_block
- no_extension_access_modifier
- no_fallthrough_only
- no_grouping_extension
# - no_magic_numbers
- no_space_in_method_call
- non_optional_string_data_conversion
- non_overridable_class_declaration
- notification_center_detachment
- ns_number_init_as_function_reference
Expand All @@ -137,6 +141,7 @@ only_rules:
- nsobject_prefer_isequal
- number_separator
# - object_literal
# - one_declaration_per_file
- opening_brace
- operator_usage_whitespace
- operator_whitespace
Expand All @@ -146,6 +151,7 @@ only_rules:
- override_in_extension
- pattern_matching_keywords
- period_spacing
- prefer_key_path
- prefer_nimble
- prefer_self_in_static_references
- prefer_self_type_over_type_of_self
Expand Down Expand Up @@ -181,6 +187,7 @@ only_rules:
# - return_value_from_void_function
- self_binding
- self_in_property_initialization
# - shorthand_argument
- shorthand_operator
- shorthand_optional_binding
- single_test_class
Expand All @@ -189,6 +196,7 @@ only_rules:
- sorted_imports
- statement_position
- static_operator
- static_over_final_class
- strict_fileprivate
- strong_iboutlet
- superfluous_disable_command
Expand Down Expand Up @@ -221,6 +229,7 @@ only_rules:
- unused_control_flow_label
- unused_enumerated
- unused_optional_binding
- unused_parameter
- unused_setter_value
- valid_ibinspectable
- vertical_parameter_alignment
Expand Down
1 change: 0 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
included:
- Plugins
- Sources
- Tests

Expand Down
25 changes: 4 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
# Contributing to Nodes

- [Dependencies](#dependencies)
- [Open Package in Xcode](#open-package-in-xcode)
- [Static Analysis](#static-analysis)
- [Open Package](#open-package)
- [Lint Package](#lint-package)
- [Testing](#testing)
- [Creating Releases](#creating-releases)

## Dependencies

Follow the [Swift Package Resources installation instructions](https://github.com/TinderApp/Swift-Package-Resources) to install tooling dependencies.

## Open Package in Xcode
## Open Package

> The file header comment template will also be installed.
```
make open
```

## Static Analysis
## Lint Package

> SwiftLint violations are visible in Xcode as well.
Package dependencies must be resolved to download the SwiftLint binary.

```
swift package resolve
```

To run SwiftLint from the command line:

```
Expand All @@ -40,12 +29,6 @@ To run analysis rules:
make analyze
```

To enable new rules whenever SwiftLint is upgraded to a new version:

```
make rules
```

## Testing

To re-record all existing snapshot references, delete all using the following command and then run the tests.
Expand Down
1 change: 1 addition & 0 deletions Customization/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ contextGenericTypes:
workerGenericTypes:
- AnyCancellable
isViewInjectedTemplateEnabled: true
isObservableStoreEnabled: false
isPreviewProviderEnabled: false
isTestTemplatesGenerationEnabled: true
isPeripheryCommentEnabled: false
Expand Down
Loading

0 comments on commit 9990699

Please sign in to comment.