From ddd9907440428990cf9c5afcc453f11c9878a1b9 Mon Sep 17 00:00:00 2001 From: "Denny C. Dai" Date: Wed, 7 Sep 2022 15:21:19 -0700 Subject: [PATCH] Pre-submit test validation action workflow (#115) --- .github/workflows/pre_submit_check.yml | 18 ++ scripts/build_test_spm_samples.sh | 3 +- .../gRPCSample.xcodeproj/project.pbxproj | 271 +----------------- .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 93 ------ .../gRPCSample/Assets.xcassets/Contents.json | 6 - .../gRPCSample/gRPCSample/ContentView.swift | 25 +- .../Preview Assets.xcassets/Contents.json | 6 - .../gRPCSample/gRPCSample/gRPCSampleApp.swift | 24 +- .../gRPCSampleTests/gRPCSampleTests.swift | 36 --- .../gRPCSampleUITests/gRPCSampleUITests.swift | 41 --- .../gRPCSampleUITestsLaunchTests.swift | 32 --- 12 files changed, 62 insertions(+), 504 deletions(-) create mode 100644 .github/workflows/pre_submit_check.yml delete mode 100644 tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 tests/spm/gRPCSample/gRPCSample/Assets.xcassets/Contents.json delete mode 100644 tests/spm/gRPCSample/gRPCSample/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 tests/spm/gRPCSample/gRPCSampleTests/gRPCSampleTests.swift delete mode 100644 tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITests.swift delete mode 100644 tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITestsLaunchTests.swift diff --git a/.github/workflows/pre_submit_check.yml b/.github/workflows/pre_submit_check.yml new file mode 100644 index 0000000000..1e6fb5386d --- /dev/null +++ b/.github/workflows/pre_submit_check.yml @@ -0,0 +1,18 @@ +name: Pre submit tests and validations on main development branch +on: + pull_request: + branches: + - 'main' + repository_dispatch: + types: [pre-submit-check] +jobs: + Pre-Submit-Check-Main-Branch: + runs-on: macos-latest + steps: + - name: Repo Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: SPM sample app build test + run: scripts/build_test_spm_samples.sh diff --git a/scripts/build_test_spm_samples.sh b/scripts/build_test_spm_samples.sh index d6d5db20cc..003db6e80d 100755 --- a/scripts/build_test_spm_samples.sh +++ b/scripts/build_test_spm_samples.sh @@ -9,8 +9,9 @@ SCHEME=gRPCSample DESTINATION='name=iPhone 11' # custom build flags +# TODO: re-enable warning as error after grpc native warning fix (https://github.com/grpc/grpc-ios/issues/83) BUILD_FLAGS=" - GCC_TREAT_WARNINGS_AS_ERRORS=YES + GCC_TREAT_WARNINGS_AS_ERRORS=NO " # build via xcodebuild command line diff --git a/tests/spm/gRPCSample/gRPCSample.xcodeproj/project.pbxproj b/tests/spm/gRPCSample/gRPCSample.xcodeproj/project.pbxproj index 1be1606fa7..44e59ff658 100644 --- a/tests/spm/gRPCSample/gRPCSample.xcodeproj/project.pbxproj +++ b/tests/spm/gRPCSample/gRPCSample.xcodeproj/project.pbxproj @@ -7,47 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 7463595E2849791200149F78 /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7463595D2849791200149F78 /* build.xcconfig */; }; - 7463595F2849791200149F78 /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7463595D2849791200149F78 /* build.xcconfig */; }; - 746359602849791200149F78 /* build.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7463595D2849791200149F78 /* build.xcconfig */; }; 74A9233F28495904008A8B94 /* gRPCSampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A9233E28495904008A8B94 /* gRPCSampleApp.swift */; }; 74A9234128495904008A8B94 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A9234028495904008A8B94 /* ContentView.swift */; }; - 74A9234328495906008A8B94 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 74A9234228495906008A8B94 /* Assets.xcassets */; }; - 74A9234628495906008A8B94 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 74A9234528495906008A8B94 /* Preview Assets.xcassets */; }; - 74A9235028495906008A8B94 /* gRPCSampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A9234F28495906008A8B94 /* gRPCSampleTests.swift */; }; - 74A9235A28495906008A8B94 /* gRPCSampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A9235928495906008A8B94 /* gRPCSampleUITests.swift */; }; - 74A9235C28495906008A8B94 /* gRPCSampleUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A9235B28495906008A8B94 /* gRPCSampleUITestsLaunchTests.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 74A9234C28495906008A8B94 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74A9233328495904008A8B94 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 74A9233A28495904008A8B94; - remoteInfo = gRPCSample; - }; - 74A9235628495906008A8B94 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74A9233328495904008A8B94 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 74A9233A28495904008A8B94; - remoteInfo = gRPCSample; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 7463595D2849791200149F78 /* build.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = build.xcconfig; sourceTree = ""; }; 74A9233B28495904008A8B94 /* gRPCSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = gRPCSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 74A9233E28495904008A8B94 /* gRPCSampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gRPCSampleApp.swift; sourceTree = ""; }; 74A9234028495904008A8B94 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 74A9234228495906008A8B94 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 74A9234528495906008A8B94 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 74A9234B28495906008A8B94 /* gRPCSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gRPCSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 74A9234F28495906008A8B94 /* gRPCSampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gRPCSampleTests.swift; sourceTree = ""; }; - 74A9235528495906008A8B94 /* gRPCSampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gRPCSampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 74A9235928495906008A8B94 /* gRPCSampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gRPCSampleUITests.swift; sourceTree = ""; }; - 74A9235B28495906008A8B94 /* gRPCSampleUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = gRPCSampleUITestsLaunchTests.swift; sourceTree = ""; }; 74A9236C28495B2B008A8B94 /* grpc-ios */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "grpc-ios"; path = ../../..; sourceTree = ""; }; /* End PBXFileReference section */ @@ -59,20 +27,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 74A9234828495906008A8B94 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 74A9235228495906008A8B94 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -82,8 +36,6 @@ 7463595D2849791200149F78 /* build.xcconfig */, 74A9236C28495B2B008A8B94 /* grpc-ios */, 74A9233D28495904008A8B94 /* gRPCSample */, - 74A9234E28495906008A8B94 /* gRPCSampleTests */, - 74A9235828495906008A8B94 /* gRPCSampleUITests */, 74A9233C28495904008A8B94 /* Products */, ); sourceTree = ""; @@ -92,8 +44,6 @@ isa = PBXGroup; children = ( 74A9233B28495904008A8B94 /* gRPCSample.app */, - 74A9234B28495906008A8B94 /* gRPCSampleTests.xctest */, - 74A9235528495906008A8B94 /* gRPCSampleUITests.xctest */, ); name = Products; sourceTree = ""; @@ -103,37 +53,10 @@ children = ( 74A9233E28495904008A8B94 /* gRPCSampleApp.swift */, 74A9234028495904008A8B94 /* ContentView.swift */, - 74A9234228495906008A8B94 /* Assets.xcassets */, - 74A9234428495906008A8B94 /* Preview Content */, ); path = gRPCSample; sourceTree = ""; }; - 74A9234428495906008A8B94 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 74A9234528495906008A8B94 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 74A9234E28495906008A8B94 /* gRPCSampleTests */ = { - isa = PBXGroup; - children = ( - 74A9234F28495906008A8B94 /* gRPCSampleTests.swift */, - ); - path = gRPCSampleTests; - sourceTree = ""; - }; - 74A9235828495906008A8B94 /* gRPCSampleUITests */ = { - isa = PBXGroup; - children = ( - 74A9235928495906008A8B94 /* gRPCSampleUITests.swift */, - 74A9235B28495906008A8B94 /* gRPCSampleUITestsLaunchTests.swift */, - ); - path = gRPCSampleUITests; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -156,42 +79,6 @@ productReference = 74A9233B28495904008A8B94 /* gRPCSample.app */; productType = "com.apple.product-type.application"; }; - 74A9234A28495906008A8B94 /* gRPCSampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 74A9236228495906008A8B94 /* Build configuration list for PBXNativeTarget "gRPCSampleTests" */; - buildPhases = ( - 74A9234728495906008A8B94 /* Sources */, - 74A9234828495906008A8B94 /* Frameworks */, - 74A9234928495906008A8B94 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 74A9234D28495906008A8B94 /* PBXTargetDependency */, - ); - name = gRPCSampleTests; - productName = gRPCSampleTests; - productReference = 74A9234B28495906008A8B94 /* gRPCSampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 74A9235428495906008A8B94 /* gRPCSampleUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 74A9236528495906008A8B94 /* Build configuration list for PBXNativeTarget "gRPCSampleUITests" */; - buildPhases = ( - 74A9235128495906008A8B94 /* Sources */, - 74A9235228495906008A8B94 /* Frameworks */, - 74A9235328495906008A8B94 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 74A9235728495906008A8B94 /* PBXTargetDependency */, - ); - name = gRPCSampleUITests; - productName = gRPCSampleUITests; - productReference = 74A9235528495906008A8B94 /* gRPCSampleUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -200,19 +87,11 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1330; - LastUpgradeCheck = 1330; + LastUpgradeCheck = 1340; TargetAttributes = { 74A9233A28495904008A8B94 = { CreatedOnToolsVersion = 13.3; }; - 74A9234A28495906008A8B94 = { - CreatedOnToolsVersion = 13.3; - TestTargetID = 74A9233A28495904008A8B94; - }; - 74A9235428495906008A8B94 = { - CreatedOnToolsVersion = 13.3; - TestTargetID = 74A9233A28495904008A8B94; - }; }; }; buildConfigurationList = 74A9233628495904008A8B94 /* Build configuration list for PBXProject "gRPCSample" */; @@ -229,8 +108,6 @@ projectRoot = ""; targets = ( 74A9233A28495904008A8B94 /* gRPCSample */, - 74A9234A28495906008A8B94 /* gRPCSampleTests */, - 74A9235428495906008A8B94 /* gRPCSampleUITests */, ); }; /* End PBXProject section */ @@ -240,25 +117,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7463595E2849791200149F78 /* build.xcconfig in Resources */, - 74A9234628495906008A8B94 /* Preview Assets.xcassets in Resources */, - 74A9234328495906008A8B94 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 74A9234928495906008A8B94 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7463595F2849791200149F78 /* build.xcconfig in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 74A9235328495906008A8B94 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 746359602849791200149F78 /* build.xcconfig in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -274,36 +132,9 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 74A9234728495906008A8B94 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74A9235028495906008A8B94 /* gRPCSampleTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 74A9235128495906008A8B94 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74A9235C28495906008A8B94 /* gRPCSampleUITestsLaunchTests.swift in Sources */, - 74A9235A28495906008A8B94 /* gRPCSampleUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 74A9234D28495906008A8B94 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 74A9233A28495904008A8B94 /* gRPCSample */; - targetProxy = 74A9234C28495906008A8B94 /* PBXContainerItemProxy */; - }; - 74A9235728495906008A8B94 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 74A9233A28495904008A8B94 /* gRPCSample */; - targetProxy = 74A9235628495906008A8B94 /* PBXContainerItemProxy */; - }; 74A9236E28495B41008A8B94 /* PBXTargetDependency */ = { isa = PBXTargetDependency; productRef = 74A9236D28495B41008A8B94 /* gRPC-Core */; @@ -365,7 +196,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -420,7 +251,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -434,11 +265,10 @@ 74A9236028495906008A8B94 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"gRPCSample/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = ""; ENABLE_PREVIEWS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -463,11 +293,10 @@ 74A9236128495906008A8B94 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"gRPCSample/Preview Content\""; + DEVELOPMENT_ASSET_PATHS = ""; ENABLE_PREVIEWS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -489,78 +318,6 @@ }; name = Release; }; - 74A9236328495906008A8B94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.google.grpc.gRPCSampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gRPCSample.app/gRPCSample"; - }; - name = Debug; - }; - 74A9236428495906008A8B94 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.google.grpc.gRPCSampleTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/gRPCSample.app/gRPCSample"; - }; - name = Release; - }; - 74A9236628495906008A8B94 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.google.grpc.gRPCSampleUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = gRPCSample; - }; - name = Debug; - }; - 74A9236728495906008A8B94 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.google.grpc.gRPCSampleUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = gRPCSample; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -582,24 +339,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 74A9236228495906008A8B94 /* Build configuration list for PBXNativeTarget "gRPCSampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 74A9236328495906008A8B94 /* Debug */, - 74A9236428495906008A8B94 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 74A9236528495906008A8B94 /* Build configuration list for PBXNativeTarget "gRPCSampleUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 74A9236628495906008A8B94 /* Debug */, - 74A9236728495906008A8B94 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCSwiftPackageProductDependency section */ diff --git a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AccentColor.colorset/Contents.json b/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897008..0000000000 --- a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5a3257a7d0..0000000000 --- a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/Contents.json b/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7..0000000000 --- a/tests/spm/gRPCSample/gRPCSample/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/tests/spm/gRPCSample/gRPCSample/ContentView.swift b/tests/spm/gRPCSample/gRPCSample/ContentView.swift index a85e82feca..a254f9c2e8 100644 --- a/tests/spm/gRPCSample/gRPCSample/ContentView.swift +++ b/tests/spm/gRPCSample/gRPCSample/ContentView.swift @@ -1,12 +1,24 @@ -// -// ContentView.swift -// gRPCSample -// -// Created by Denny Dai on 6/2/22. -// +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import SwiftUI +@available(iOS 14.0, *) struct ContentView: View { var body: some View { Text("Hello, world!") @@ -14,6 +26,7 @@ struct ContentView: View { } } +@available(iOS 14.0, *) struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() diff --git a/tests/spm/gRPCSample/gRPCSample/Preview Content/Preview Assets.xcassets/Contents.json b/tests/spm/gRPCSample/gRPCSample/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7..0000000000 --- a/tests/spm/gRPCSample/gRPCSample/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/tests/spm/gRPCSample/gRPCSample/gRPCSampleApp.swift b/tests/spm/gRPCSample/gRPCSample/gRPCSampleApp.swift index 3a8e9e9a0a..6623f91b9c 100644 --- a/tests/spm/gRPCSample/gRPCSample/gRPCSampleApp.swift +++ b/tests/spm/gRPCSample/gRPCSample/gRPCSampleApp.swift @@ -1,12 +1,24 @@ -// -// gRPCSampleApp.swift -// gRPCSample -// -// Created by Denny Dai on 6/2/22. -// +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import SwiftUI +@available(iOS 14.0, *) @main struct gRPCSampleApp: App { var body: some Scene { diff --git a/tests/spm/gRPCSample/gRPCSampleTests/gRPCSampleTests.swift b/tests/spm/gRPCSample/gRPCSampleTests/gRPCSampleTests.swift deleted file mode 100644 index 93cf9ebf94..0000000000 --- a/tests/spm/gRPCSample/gRPCSampleTests/gRPCSampleTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// gRPCSampleTests.swift -// gRPCSampleTests -// -// Created by Denny Dai on 6/2/22. -// - -import XCTest -@testable import gRPCSample - -class gRPCSampleTests: 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. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITests.swift b/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITests.swift deleted file mode 100644 index 9b29fb274c..0000000000 --- a/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITests.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// gRPCSampleUITests.swift -// gRPCSampleUITests -// -// Created by Denny Dai on 6/2/22. -// - -import XCTest - -class gRPCSampleUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - 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 { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() throws { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITestsLaunchTests.swift b/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITestsLaunchTests.swift deleted file mode 100644 index 52c7c11d98..0000000000 --- a/tests/spm/gRPCSample/gRPCSampleUITests/gRPCSampleUITestsLaunchTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// gRPCSampleUITestsLaunchTests.swift -// gRPCSampleUITests -// -// Created by Denny Dai on 6/2/22. -// - -import XCTest - -class gRPCSampleUITestsLaunchTests: XCTestCase { - - override class var runsForEachTargetApplicationUIConfiguration: Bool { - true - } - - override func setUpWithError() throws { - continueAfterFailure = false - } - - func testLaunch() throws { - let app = XCUIApplication() - app.launch() - - // Insert steps here to perform after app launch but before taking a screenshot, - // such as logging into a test account or navigating somewhere in the app - - let attachment = XCTAttachment(screenshot: app.screenshot()) - attachment.name = "Launch Screen" - attachment.lifetime = .keepAlways - add(attachment) - } -}