Skip to content

Commit

Permalink
Move xcodeproj into Xcode folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Apr 8, 2024
1 parent 2a066a8 commit 5c002d7
Show file tree
Hide file tree
Showing 29 changed files with 83 additions and 79 deletions.
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ parent_config: https://raw.githubusercontent.com/Automattic/swiftlint-config/0f8
remote_timeout: 10.0

excluded:
.build # `swift build` etc. output folder
- .build # `swift build` etc. output folder
- Xcode/DerivedData/**

opt_in_rules:
- overridden_super_call
Expand Down
5 changes: 3 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ def wordpresskit_pods
pod 'UIDeviceIdentifier', '~> 2.0'
end

workspace 'Xcode/WordPressKit.xcworkspace'
project 'Xcode/WordPressKit.xcodeproj'

## WordPress Kit
## =============
##
target 'WordPressKit' do
project 'WordPressKit.xcodeproj'
wordpresskit_pods
end

target 'WordPressKitTests' do
project 'WordPressKit.xcodeproj'
wordpresskit_pods

pod 'OHHTTPStubs', '~> 9.0'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ SPEC CHECKSUMS:
WordPressShared: f93f99269258b46dad04f4e4dbf540ce2e5c1e66
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd

PODFILE CHECKSUM: 64af6d71574c7a92d01a9446aa874e066917ebe5
PODFILE CHECKSUM: 73cfa652ae983aa3de16df0e749114d4fae67140

COCOAPODS: 1.15.2
2 changes: 2 additions & 0 deletions Xcode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SwiftLint Remote Config Cache
.swiftlint/RemoteConfigCache

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
codeCoverageEnabled = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Tests/WordPressKitTests/UnitTests.xctestplan"
reference = "container:../Tests/WordPressKitTests/UnitTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "f28a54e288718485642adbe7b780a05abf05f95f0f435b3f87b6d3684b95d268",
"pins" : [
{
"identity" : "test-collector-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/buildkite/test-collector-swift",
"state" : {
"revision" : "6e46839e1a4507ee047acd0896e29b9b278d9e3a",
"version" : "0.4.0"
}
}
],
"version" : 3
}
18 changes: 15 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS = '-skipPackagePluginValidation -skipM
platform :ios do
# "swift build" fails because of the UIKit dependency, so we need to validate the package via xcodebuild
lane :package_build do
scheme = 'WordPressKit'
scheme = 'WordPressKit-Package'

# We need to explicitly step the derived data folder, otherwise we'll get errors like:
# > Cannot find .xcresult in derived data which is needed to determine test results.
derived_data_path = File.join(__dir__, '.build', 'derived-data')

xcodebuild(
scheme:,
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS}"
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS} -derivedDataPath #{derived_data_path}"
)

run_tests(
package_path: '.',
scheme:,
device: 'iPhone 15',
prelaunch_simulator: true,
xcargs: SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS
xcargs: SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS,
derived_data_path:
)
end

Expand All @@ -44,7 +49,14 @@ platform :ios do

desc 'Builds the project and runs tests'
lane :test do
derived_data_path = File.join(__dir__, '.build', 'derived-data')
xcodebuild(
workspace: File.join(__dir__, 'Xcode', 'WordPressKit.xcworkspace'),
scheme: 'WordPressKit',
xcargs: "-resolvePackageDependencies #{SWIFTLINT_PLUGIN_VALIDATION_BYPASS_XCARGS} -derivedDataPath #{derived_data_path}"
)
run_tests(
workspace: File.join(__dir__, 'Xcode', 'WordPressKit.xcworkspace'),
scheme: 'WordPressKit',
prelaunch_simulator: true,
result_bundle: true,
Expand Down

0 comments on commit 5c002d7

Please sign in to comment.