diff --git a/.github/workflows/BUILD_PACKAGE.yml b/.github/workflows/BUILD_PACKAGE.yml index f899e62a..b4f5dbcb 100644 --- a/.github/workflows/BUILD_PACKAGE.yml +++ b/.github/workflows/BUILD_PACKAGE.yml @@ -24,7 +24,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: '๐Ÿ”จ iOS 16.2 iPhone 14 Pro ์—์„œ ์Šค์œ„ํ”„ํŠธ ํŒจํ‚ค์ง€๋ฅผ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.' + body: '๐Ÿ”จ iOS 17.0 iPhone 14 Pro ์—์„œ ์Šค์œ„ํ”„ํŠธ ํŒจํ‚ค์ง€๋ฅผ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.' }) # ์ฝ”๋“œ๋ฅผ ์ฒดํฌ์•„์›ƒ ํ•ฉ๋‹ˆ๋‹ค. @@ -40,8 +40,8 @@ jobs: # KuringModulePackage ํŒจํ‚ค์ง€๋ฅผ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค. (์ตœ์†Œ ๋ฒ„์ „) - name: KuringModulePackage ๋นŒ๋“œ run: | - cd KuringModulePackage - xcodebuild build -scheme KuringModulePackage -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14 Pro' + cd KuringPackage + xcodebuild build -scheme App -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14 Pro' # ๋นŒ๋“œ ์„ฑ๊ณต์‹œ ์ปค๋ฉ˜ํŠธ - name: Add Build comment diff --git a/.github/workflows/TEST_PACKAGE_TARGET_iOS17.yml b/.github/workflows/TEST_PACKAGE_TARGET_iOS17.yml new file mode 100644 index 00000000..e1f3c779 --- /dev/null +++ b/.github/workflows/TEST_PACKAGE_TARGET_iOS17.yml @@ -0,0 +1,80 @@ +name: ์ฟ ๋ง ํŒจํ‚ค์ง€ iOS17์—์„œ ํ…Œ์ŠคํŠธํ•˜๊ธฐ + +on: + issue_comment: + types: [created, edited] + +jobs: + build: + if: github.event.issue.pull_request && contains(github.event.comment.body, '/์ฟ ๋ง') && contains(github.event.comment.body, 'ios17 ํŒจํ‚ค์ง€ ํ…Œ์ŠคํŠธ') + runs-on: macos-13 #์ตœ์‹ ๋ฒ„์ „ + steps: + # ํ…Œ์ŠคํŠธ ์š”์ฒญ ์‹œ์ž‘ + - name: Test iOS17 + run: | + echo "iOS17 ์—์„œ ํŒจํ‚ค์ง€์˜ ๋ชจ๋“  ํ…Œ์ŠคํŠธ ํƒ€๊ฒŸ์„ ํ…Œ์ŠคํŠธ ํ•ฉ๋‹ˆ๋‹ค." + + # iOS17 ํ…Œ์ŠคํŠธ ์‘๋‹ต ์ปค๋ฉ˜ํŠธ + - name: Add Test comment + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '๐Ÿ”จ iOS 17.0 iPhone 15 Pro ์—์„œ ์ฟ ๋ง ์•ฑ์„ ํ…Œ์ŠคํŠธ ํ•ฉ๋‹ˆ๋‹ค.' + }) + + # ์ฝ”๋“œ๋ฅผ ์ฒดํฌ์•„์›ƒ ํ•ฉ๋‹ˆ๋‹ค. + - name: Checkout repository + uses: actions/checkout@v2 + + # Xcode ๋ฒ„์ „์„ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. + - name: Setup Xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '15.0' + + # KuringPackage ๊ฒฝ๋กœ๋กœ ์ด๋™ + - name: ํŒจํ‚ค์ง€ ๊ฒฝ๋กœ๋กœ ์ด๋™ + run: | + cd KuringPackage + + # NoticeFeaturesTests ์Šคํ‚ด์„ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค. + - name: NoticeFeaturesTests ํ…Œ์ŠคํŠธ + run: | + xcodebuild test -scheme NoticeFeaturesTests -destination 'platform=iOS Simulator,OS=17.0,name=iPhone 15 Pro' + + # SubscriptionFeaturesTests ์Šคํ‚ด์„ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค. + - name: SubscriptionFeaturesTests ํ…Œ์ŠคํŠธ + run: | + xcodebuild test -scheme SubscriptionFeaturesTests -destination 'platform=iOS Simulator,OS=17.0,name=iPhone 15 Pro' + + # ํ…Œ์ŠคํŠธ ์„ฑ๊ณต์‹œ ์ปค๋ฉ˜ํŠธ + - name: Add Build comment + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'โœ… iOS17 ์—์„œ ํŒจํ‚ค์ง€๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ํ…Œ์ŠคํŠธ ํ–ˆ์Šต๋‹ˆ๋‹ค.' + }) + + # ํ…Œ์ŠคํŠธ ์‹คํŒจ์‹œ ์ปค๋ฉ˜ํŠธ + - name: Notify failure + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '๐Ÿ“ฌ iOS17 ์—์„œ ํŒจํ‚ค์ง€ ํ…Œ์ŠคํŠธ์— ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค. Actions์—์„œ ์‹คํŒจ ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”.' + }) + if: failure() diff --git a/KuringApp/KuringApp.xcodeproj/project.pbxproj b/KuringApp/KuringApp.xcodeproj/project.pbxproj index c377e061..f317cdf4 100644 --- a/KuringApp/KuringApp.xcodeproj/project.pbxproj +++ b/KuringApp/KuringApp.xcodeproj/project.pbxproj @@ -15,9 +15,6 @@ A9DAFA562AB1F04B0064F748 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DAFA552AB1F04B0064F748 /* ContentView.swift */; }; A9DAFA582AB1F04C0064F748 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9DAFA572AB1F04C0064F748 /* Assets.xcassets */; }; A9DAFA5B2AB1F04C0064F748 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9DAFA5A2AB1F04C0064F748 /* Preview Assets.xcassets */; }; - CA52DF392AD58F4B009B9272 /* NoticeAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA52DF382AD58F4B009B9272 /* NoticeAppTests.swift */; }; - CA640C1D2AD84E10002836E0 /* SubscriptionViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA640C1C2AD84E10002836E0 /* SubscriptionViewTests.swift */; }; - CA640C1F2AD8525D002836E0 /* SubscriptionAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA640C1E2AD8525D002836E0 /* SubscriptionAppTests.swift */; }; CAE658662B3992A800CD8A63 /* App in Frameworks */ = {isa = PBXBuildFile; productRef = CAE658652B3992A800CD8A63 /* App */; }; DF331DAB2AC917E100D0BB08 /* kuring_app.png in Resources */ = {isa = PBXBuildFile; fileRef = DF331DA72AC917E000D0BB08 /* kuring_app.png */; }; DF331DAC2AC917E100D0BB08 /* kuring_app_classic.png in Resources */ = {isa = PBXBuildFile; fileRef = DF331DA82AC917E000D0BB08 /* kuring_app_classic.png */; }; @@ -48,9 +45,6 @@ A9DAFA572AB1F04C0064F748 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; A9DAFA5A2AB1F04C0064F748 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; CA52DF2F2AD58DF2009B9272 /* KuringAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KuringAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - CA52DF382AD58F4B009B9272 /* NoticeAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeAppTests.swift; sourceTree = ""; }; - CA640C1C2AD84E10002836E0 /* SubscriptionViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionViewTests.swift; sourceTree = ""; }; - CA640C1E2AD8525D002836E0 /* SubscriptionAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionAppTests.swift; sourceTree = ""; }; DF062D4A2AC87B6D00FC48C0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; DF331DA72AC917E000D0BB08 /* kuring_app.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = kuring_app.png; sourceTree = ""; }; DF331DA82AC917E000D0BB08 /* kuring_app_classic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = kuring_app_classic.png; sourceTree = ""; }; @@ -146,9 +140,6 @@ CA52DF302AD58DF2009B9272 /* KuringAppTests */ = { isa = PBXGroup; children = ( - CA52DF382AD58F4B009B9272 /* NoticeAppTests.swift */, - CA640C1C2AD84E10002836E0 /* SubscriptionViewTests.swift */, - CA640C1E2AD8525D002836E0 /* SubscriptionAppTests.swift */, ); path = KuringAppTests; sourceTree = ""; @@ -302,9 +293,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CA52DF392AD58F4B009B9272 /* NoticeAppTests.swift in Sources */, - CA640C1D2AD84E10002836E0 /* SubscriptionViewTests.swift in Sources */, - CA640C1F2AD8525D002836E0 /* SubscriptionAppTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/KuringPackage.xcscheme b/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/KuringPackage.xcscheme index ec2f2f07..7f588a48 100644 --- a/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/KuringPackage.xcscheme +++ b/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/KuringPackage.xcscheme @@ -28,6 +28,28 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" shouldAutocreateTestPlan = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/SubscriptionFeaturesTests.xcscheme b/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/SubscriptionFeaturesTests.xcscheme new file mode 100644 index 00000000..911773fc --- /dev/null +++ b/KuringPackage/.swiftpm/xcode/xcshareddata/xcschemes/SubscriptionFeaturesTests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/KuringPackage/Package.swift b/KuringPackage/Package.swift index 01fb026e..218ebe5b 100644 --- a/KuringPackage/Package.swift +++ b/KuringPackage/Package.swift @@ -129,5 +129,21 @@ let package = Package( .target( name: "Models" ), + + // MARK: - Tests + .testTarget( + name: "NoticeFeaturesTests", + dependencies: [ + "NoticeFeatures", "SearchFeatures", "Models", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), + .testTarget( + name: "SubscriptionFeaturesTests", + dependencies: [ + "SubscriptionFeatures", "DepartmentFeatures", "Models", + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + ] + ), ] ) diff --git a/KuringApp/KuringAppTests/NoticeAppTests.swift b/KuringPackage/Tests/NoticeFeaturesTests/NoticeAppTests.swift similarity index 86% rename from KuringApp/KuringAppTests/NoticeAppTests.swift rename to KuringPackage/Tests/NoticeFeaturesTests/NoticeAppTests.swift index 66148529..3436300c 100644 --- a/KuringApp/KuringAppTests/NoticeAppTests.swift +++ b/KuringPackage/Tests/NoticeFeaturesTests/NoticeAppTests.swift @@ -1,13 +1,7 @@ -// -// NoticeAppTests.swift -// KuringAppTests -// -// Created by ์ด์žฌ์„ฑ on 10/10/23. -// - import XCTest import ComposableArchitecture -@testable import KuringApp +@testable import NoticeFeatures +@testable import SearchFeatures @MainActor final class NoticeAppTests: XCTestCase { diff --git a/KuringApp/KuringAppTests/SubscriptionAppTests.swift b/KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionAppTests.swift similarity index 92% rename from KuringApp/KuringAppTests/SubscriptionAppTests.swift rename to KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionAppTests.swift index 78a28a78..613b3d17 100644 --- a/KuringApp/KuringAppTests/SubscriptionAppTests.swift +++ b/KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionAppTests.swift @@ -1,13 +1,8 @@ -// -// SubscriptionAppTests.swift -// KuringAppTests -// -// Created by ์ด์žฌ์„ฑ on 10/13/23. -// - import XCTest import ComposableArchitecture -@testable import KuringApp +@testable import Models +@testable import DepartmentFeatures +@testable import SubscriptionFeatures @MainActor class SubscriptionAppTests: XCTestCase { @@ -15,12 +10,14 @@ class SubscriptionAppTests: XCTestCase { let ์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€ = NoticeProvider( name: "computer_science", hostPrefix: "cse", - korName: "์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€" + korName: "์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€", + category: .ํ•™๊ณผ ) let ์ฒด์œก๊ต์œก๊ณผ = NoticeProvider( name: "physical_education", hostPrefix: "kupe", - korName: "์ฒด์œก๊ต์œก๊ณผ" + korName: "์ฒด์œก๊ต์œก๊ณผ", + category: .ํ•™๊ณผ ) let store = TestStore( diff --git a/KuringApp/KuringAppTests/SubscriptionViewTests.swift b/KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionTests.swift similarity index 89% rename from KuringApp/KuringAppTests/SubscriptionViewTests.swift rename to KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionTests.swift index c20c5ca8..5adc3222 100644 --- a/KuringApp/KuringAppTests/SubscriptionViewTests.swift +++ b/KuringPackage/Tests/SubscriptionFeaturesTests/SubscriptionTests.swift @@ -1,16 +1,11 @@ -// -// SubscriptionViewTests.swift -// KuringAppTests -// -// Created by ์ด์žฌ์„ฑ on 10/13/23. -// - import XCTest import ComposableArchitecture -@testable import KuringApp +@testable import Models +@testable import DepartmentFeatures +@testable import SubscriptionFeatures @MainActor -class SubscriptionViewTests: XCTestCase { +class SubscriptionTests: XCTestCase { func test_tapConfirmButton() async throws { let store = TestStore( initialState: SubscriptionFeature.State(), @@ -48,7 +43,8 @@ class SubscriptionViewTests: XCTestCase { let department = NoticeProvider( name: "computer_science", hostPrefix: "cse", - korName: "์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€" + korName: "์ปดํ“จํ„ฐ๊ณตํ•™๋ถ€", + category: .ํ•™๊ณผ ) let store = TestStore( initialState: SubscriptionFeature.State(myDepartments: [department]),