diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..14c6c98 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: Test +on: + pull_request: + branches: [main] + push: + branches: [main] + workflow_dispatch: + +jobs: + test: + runs-on: macos-11 + name: Test + steps: + - uses: actions/checkout@v2 + - name: Test + run: | + xcodebuild clean test -project SOPTving/SOPTving.xcodeproj -scheme SOPTvingTests -destination 'platform=iOS Simulator,name=iPhone 11 Pro,OS=14.4' -resultBundlePath TestResults.xcresult + + - uses: kishikawakatsumi/xcresulttool@v1 + with: + path: TestResults.xcresult + if: success() || failure() diff --git a/SOPTving/SOPTving.xcodeproj/project.pbxproj b/SOPTving/SOPTving.xcodeproj/project.pbxproj index 1c7701d..cfcf2ab 100644 --- a/SOPTving/SOPTving.xcodeproj/project.pbxproj +++ b/SOPTving/SOPTving.xcodeproj/project.pbxproj @@ -47,6 +47,7 @@ B598C0FE29E9C58700FDEF04 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = B598C0FD29E9C58700FDEF04 /* String+.swift */; }; B598C10029E9D35E00FDEF04 /* ModuleFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = B598C0FF29E9D35E00FDEF04 /* ModuleFactory.swift */; }; B598C10229E9D60100FDEF04 /* BottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B598C10129E9D60100FDEF04 /* BottomSheetViewController.swift */; }; + B5ACF6E62B219AA1006D7641 /* SOPTvingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5ACF6E52B219AA1006D7641 /* SOPTvingTests.swift */; }; B5D0CAD929FD9D1700D1F271 /* MainHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D0CAD829FD9D1700D1F271 /* MainHomeViewController.swift */; }; B5D0CADB29FDA91100D1F271 /* ImageBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D0CADA29FDA91100D1F271 /* ImageBannerCollectionViewCell.swift */; }; B5D0CADE29FDAC8000D1F271 /* ScreenUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D0CADD29FDAC8000D1F271 /* ScreenUtils.swift */; }; @@ -92,6 +93,16 @@ B5F22E732A0D7A90006F5552 /* downloadImageFromURLString.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F22E722A0D7A90006F5552 /* downloadImageFromURLString.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + B5ACF6E72B219AA1006D7641 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B598C09F29E8070E00FDEF04 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B598C0A629E8070E00FDEF04; + remoteInfo = SOPTving; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ B52FA8EC29FAF4D400AC384B /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; B52FA8EE29FAF51300AC384B /* NavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = ""; }; @@ -134,6 +145,8 @@ B598C0FD29E9C58700FDEF04 /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = ""; }; B598C0FF29E9D35E00FDEF04 /* ModuleFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModuleFactory.swift; sourceTree = ""; }; B598C10129E9D60100FDEF04 /* BottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomSheetViewController.swift; sourceTree = ""; }; + B5ACF6E32B219AA1006D7641 /* SOPTvingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SOPTvingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B5ACF6E52B219AA1006D7641 /* SOPTvingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SOPTvingTests.swift; sourceTree = ""; }; B5D0CAD829FD9D1700D1F271 /* MainHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainHomeViewController.swift; sourceTree = ""; }; B5D0CADA29FDA91100D1F271 /* ImageBannerCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageBannerCollectionViewCell.swift; sourceTree = ""; }; B5D0CADD29FDAC8000D1F271 /* ScreenUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenUtils.swift; sourceTree = ""; }; @@ -188,6 +201,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B5ACF6E02B219AA1006D7641 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -231,6 +251,7 @@ isa = PBXGroup; children = ( B598C0A929E8070E00FDEF04 /* SOPTving */, + B5ACF6E42B219AA1006D7641 /* SOPTvingTests */, B598C0A829E8070E00FDEF04 /* Products */, ); sourceTree = ""; @@ -239,6 +260,7 @@ isa = PBXGroup; children = ( B598C0A729E8070E00FDEF04 /* SOPTving.app */, + B5ACF6E32B219AA1006D7641 /* SOPTvingTests.xctest */, ); name = Products; sourceTree = ""; @@ -365,6 +387,14 @@ path = Login; sourceTree = ""; }; + B5ACF6E42B219AA1006D7641 /* SOPTvingTests */ = { + isa = PBXGroup; + children = ( + B5ACF6E52B219AA1006D7641 /* SOPTvingTests.swift */, + ); + path = SOPTvingTests; + sourceTree = ""; + }; B5D0CADC29FDAC7500D1F271 /* Utils */ = { isa = PBXGroup; children = ( @@ -592,6 +622,24 @@ productReference = B598C0A729E8070E00FDEF04 /* SOPTving.app */; productType = "com.apple.product-type.application"; }; + B5ACF6E22B219AA1006D7641 /* SOPTvingTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B5ACF6EB2B219AA1006D7641 /* Build configuration list for PBXNativeTarget "SOPTvingTests" */; + buildPhases = ( + B5ACF6DF2B219AA1006D7641 /* Sources */, + B5ACF6E02B219AA1006D7641 /* Frameworks */, + B5ACF6E12B219AA1006D7641 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B5ACF6E82B219AA1006D7641 /* PBXTargetDependency */, + ); + name = SOPTvingTests; + productName = SOPTvingTests; + productReference = B5ACF6E32B219AA1006D7641 /* SOPTvingTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -599,12 +647,16 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1420; + LastSwiftUpdateCheck = 1500; LastUpgradeCheck = 1420; TargetAttributes = { B598C0A629E8070E00FDEF04 = { CreatedOnToolsVersion = 14.2; }; + B5ACF6E22B219AA1006D7641 = { + CreatedOnToolsVersion = 15.0.1; + TestTargetID = B598C0A629E8070E00FDEF04; + }; }; }; buildConfigurationList = B598C0A229E8070E00FDEF04 /* Build configuration list for PBXProject "SOPTving" */; @@ -627,6 +679,7 @@ projectRoot = ""; targets = ( B598C0A629E8070E00FDEF04 /* SOPTving */, + B5ACF6E22B219AA1006D7641 /* SOPTvingTests */, ); }; /* End PBXProject section */ @@ -650,6 +703,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B5ACF6E12B219AA1006D7641 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -728,8 +788,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + B5ACF6DF2B219AA1006D7641 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B5ACF6E62B219AA1006D7641 /* SOPTvingTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + B5ACF6E82B219AA1006D7641 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B598C0A629E8070E00FDEF04 /* SOPTving */; + targetProxy = B5ACF6E72B219AA1006D7641 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ B598C0B529E8070F00FDEF04 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; @@ -918,6 +994,51 @@ }; name = Release; }; + B5ACF6E92B219AA1006D7641 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = minjae.SOPTvingTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SOPTving.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SOPTving"; + }; + name = Debug; + }; + B5ACF6EA2B219AA1006D7641 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = minjae.SOPTvingTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SOPTving.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SOPTving"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -939,6 +1060,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + B5ACF6EB2B219AA1006D7641 /* Build configuration list for PBXNativeTarget "SOPTvingTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B5ACF6E92B219AA1006D7641 /* Debug */, + B5ACF6EA2B219AA1006D7641 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/SOPTving/SOPTving.xcodeproj/xcshareddata/xcschemes/SOPTving.xcscheme b/SOPTving/SOPTving.xcodeproj/xcshareddata/xcschemes/SOPTving.xcscheme index 6786803..09999a8 100644 --- a/SOPTving/SOPTving.xcodeproj/xcshareddata/xcschemes/SOPTving.xcscheme +++ b/SOPTving/SOPTving.xcodeproj/xcshareddata/xcschemes/SOPTving.xcscheme @@ -28,6 +28,19 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" shouldAutocreateTestPlan = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SOPTving/SOPTving/Presentation/Welcome/WelcomeViewController.swift b/SOPTving/SOPTving/Presentation/Welcome/WelcomeViewController.swift index 0360c40..43356a5 100644 --- a/SOPTving/SOPTving/Presentation/Welcome/WelcomeViewController.swift +++ b/SOPTving/SOPTving/Presentation/Welcome/WelcomeViewController.swift @@ -60,6 +60,8 @@ private extension WelcomeViewController { } func style() { + + view.backgroundColor = .tvingBlack } diff --git a/SOPTving/SOPTvingTests/SOPTvingTests.swift b/SOPTving/SOPTvingTests/SOPTvingTests.swift new file mode 100644 index 0000000..0953aee --- /dev/null +++ b/SOPTving/SOPTvingTests/SOPTvingTests.swift @@ -0,0 +1,35 @@ +// +// SOPTvingTests.swift +// SOPTvingTests +// +// Created by 김민재 on 12/7/23. +// + +import XCTest + +final class SOPTvingTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } + +}