Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:
branches: [develop, main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
name: SwiftFormat lint
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install SwiftFormat
run: brew install swiftformat

- name: Run SwiftFormat (lint mode)
run: swiftformat --lint .
8 changes: 4 additions & 4 deletions DesignSystem/Asset+Alias.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import SwiftUI

public typealias Asset = DesignSystemAsset

public extension Image {
init(_ asset: DesignSystemImages) {
extension Image {
public init(_ asset: DesignSystemImages) {
self.init(asset: asset)
}
}

public extension Color {
init(_ asset: DesignSystemColors) {
extension Color {
public init(_ asset: DesignSystemColors) {
self.init(asset: asset)
}
}
8 changes: 8 additions & 0 deletions FeaturesTests/FeaturesTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest
@testable import Features

final class FeaturesTests: XCTestCase {
func testPlaceholder() {
XCTAssertTrue(true)
}
}
8 changes: 8 additions & 0 deletions MyI/Tests/MyITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest
@testable import MyI

final class MyITests: XCTestCase {
func testPlaceholder() {
XCTAssertTrue(true)
}
}
22 changes: 22 additions & 0 deletions Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@ let project = Project(
"TARGETED_DEVICE_FAMILY": "1"
]
)
),
.target(
name: "FeaturesTests",
destinations: .iOS,
product: .unitTests,
bundleId: "kr.co.codegrove.FeaturesTests",
deploymentTargets: .iOS("17.0"),
sources: ["FeaturesTests/**/*.swift"],
dependencies: [
.target(name: "Features")
]
),
.target(
name: "MyITests",
destinations: .iOS,
product: .unitTests,
bundleId: "kr.co.codegrove.MyITests",
deploymentTargets: .iOS("17.0"),
sources: ["MyI/Tests/**/*.swift"],
dependencies: [
.target(name: "MyI")
]
)
]
)
23 changes: 23 additions & 0 deletions ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
set -eu

# Xcode Cloud post-clone hook
# Tuist 프로젝트라 xcodebuild 호출 전에 xcodeproj/xcworkspace 생성이 필요.
# - GoogleService-Info.plist 복원 (Environment Variable에서)
# - Tuist 설치
# - SPM 의존성 fetch
# - xcodeproj/xcworkspace 생성

# Repo root로 이동 (ci_scripts/에서 한 단계 위)
cd "$(dirname "$0")/.."

# GoogleService-Info.plist 복원 (.gitignore라 repo에 없음)
# Xcode Cloud Environment Variable `GOOGLE_SERVICE_INFO_PLIST_BASE64`에서 디코딩.
# 로컬 빌드는 이미 plist 있으니 변수 없으면 skip.
if [ -n "${GOOGLE_SERVICE_INFO_PLIST_BASE64:-}" ]; then
echo "$GOOGLE_SERVICE_INFO_PLIST_BASE64" | base64 --decode > MyI/Resources/GoogleService-Info.plist
fi

brew install tuist
tuist install
tuist generate --no-open
Loading