Skip to content

Commit

Permalink
🔧 Fastlane unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkulman committed Jul 28, 2024
1 parent 8ea7d3e commit 1bf4240
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
11 changes: 11 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
opt_out_usage

default_platform(:ios)

desc "Run Core unit tests"
lane :tests do
scan(
devices: ["iPhone 15"],
project: "sources/SwiftUISampleApp.xcodeproj",
)
end
30 changes: 30 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

### tests

```sh
[bundle exec] fastlane tests
```

Run Core unit tests

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
2 changes: 2 additions & 0 deletions sources/SwiftUISampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
F3A329D12C52917800C73225 /* SwiftUISampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUISampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
F3A329D42C52917800C73225 /* SwiftUISampleAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUISampleAppApp.swift; sourceTree = "<group>"; };
F3A329D82C52917A00C73225 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F3EA80282C566B6E004612CF /* SwiftUISampleApp.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftUISampleApp.xctestplan; sourceTree = "<group>"; };
F3F1AE9A2C543F270028B236 /* Core */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Core; sourceTree = "<group>"; };
F3F1AE9B2C543F270028B236 /* App */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = App; sourceTree = "<group>"; };
F3F1AE9C2C543F270028B236 /* Features */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Features; sourceTree = "<group>"; };
Expand All @@ -45,6 +46,7 @@
F3A329C82C52917800C73225 = {
isa = PBXGroup;
children = (
F3EA80282C566B6E004612CF /* SwiftUISampleApp.xctestplan */,
F3F1AE9B2C543F270028B236 /* App */,
F3F1AE9A2C543F270028B236 /* Core */,
F3F1AE9C2C543F270028B236 /* Features */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,26 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:SwiftUISampleApp.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F3EA801E2C566AF9004612CF"
BuildableName = "SwiftUISampleAppTests.xctest"
BlueprintName = "SwiftUISampleAppTests"
ReferencedContainer = "container:SwiftUISampleApp.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
38 changes: 38 additions & 0 deletions sources/SwiftUISampleApp.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"configurations" : [
{
"id" : "AFDFA707-90DD-47B8-B5C1-8877DA9240A5",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {

},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Core",
"identifier" : "CoreTests",
"name" : "CoreTests"
}
},
{
"target" : {
"containerPath" : "container:Features",
"identifier" : "AboutTests",
"name" : "AboutTests"
}
},
{
"target" : {
"containerPath" : "container:Features",
"identifier" : "FeedTests",
"name" : "FeedTests"
}
}
],
"version" : 1
}

0 comments on commit 1bf4240

Please sign in to comment.