Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f7e5439
remove/#93: 컨벤션 파일 삭제
0Hooni Mar 30, 2025
4795a0a
chore/#93: 빌드 파일 수정
0Hooni Mar 30, 2025
847a725
chore/#93: 프로젝트 세팅 수정
0Hooni Mar 30, 2025
6cec4f8
add/#93: swiftlint rule 파일 추가
0Hooni Mar 30, 2025
5782305
chore/#93: SwiftLint rule 파일 기본 세팅
0Hooni Mar 31, 2025
1541948
remove#93: 불필요한 파일 삭제
0Hooni Mar 31, 2025
8e0e591
docs/#93: SwiftLint 문법 수정
0Hooni Mar 31, 2025
ab6df32
feat/#93: Swiftlint 자동 수정 깃허브 액션 추가
0Hooni Apr 2, 2025
3fd8a70
remove/#93: 사용하지 않는 테스트 타겟 제거
0Hooni Apr 2, 2025
e3cdf10
feat/#93: CI 깃허브 액션 추가
0Hooni Apr 2, 2025
4420daf
fix/#93: CI가 깃액션 봇의 커밋은 무시하도록 수정
0Hooni Apr 2, 2025
2fcd2cf
chore/#93: Debug.xcconfig로 대체하기 위한 빌드 설정 수정
0Hooni Apr 2, 2025
37a7022
chore/#93: gitignore 수정 및 정리
0Hooni Apr 2, 2025
46b9311
refactor/#93: 변경 된 키 저장 방식에 맞게 키 호출 코드 수정
0Hooni Apr 2, 2025
7af96b8
refactor/#93: GitHubActions 파일 추가 수정
0Hooni Apr 2, 2025
fb7918f
chore/#93: CI에 Debug.xcconfig 생성 스텝 추가
0Hooni Apr 2, 2025
b00d50b
refactor/#93: Secrets.swift 제거
0Hooni Apr 2, 2025
f958ff6
refactor/#93: Secrets enum → KeyPath enum 변경 대응
0Hooni Apr 2, 2025
334a4a3
chore/#93: CI 태스크 이름 수정
0Hooni Apr 2, 2025
2253ee8
test/#93: CI 테스트를 위한 임시 swiftlint룰 적용
0Hooni Apr 2, 2025
3d31395
refactor/#93: CI, AutoCorrect 통합
0Hooni Apr 2, 2025
05e9118
fix/#93: 린트 자동수정 명령어 수정
0Hooni Apr 2, 2025
eac393c
fix/#93: 린트 자동수정 에러 수정 및 빌드파일 경로 탐지 추가
0Hooni Apr 2, 2025
ee45fe3
fix/#93: 이슈번호 검출 정규표현식 개선 및 린트 자동수정 커밋 에러 해결
0Hooni Apr 2, 2025
50f48c8
fix/#93: 자동수정 커밋 액션 No upstream branch 에러 수정
0Hooni Apr 2, 2025
13b2b64
style/#93: Apply SwiftLint autocorrect
github-actions[bot] Apr 2, 2025
5decd58
Merge branch 'dev' of https://github.com/PopPool/iOS into style/#93-a…
0Hooni Apr 3, 2025
82931e9
refactor/#93: Swiftlint 에러 수정
0Hooni Apr 3, 2025
81f4aaf
style/#93: Apply SwiftLint autocorrect
github-actions[bot] Apr 3, 2025
7177fc0
style/#93: 코드 스타일에 맞게 일부 코드 수정
0Hooni Apr 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CI

on:
pull_request:
branches: [dev]
push:
branches: [dev]

jobs:
autocorrect:
name: 🤖 Autocorrect Workflow
runs-on: macos-15 # 최신 macOS 15 환경에서 실행
if: github.actor != 'github-actions[bot]' # Actions 봇 커밋은 무시

steps:
- name: Checkout Repository # 저장소 코드 체크아웃
uses: actions/checkout@v4

- name: 🛠️ Set up Xcode # Xcode 16.2 선택
run: sudo xcode-select -s /Applications/Xcode_16.2.app

- name: ⬇️ Install SwiftLint # SwiftLint 설치
run: brew install swiftlint

- name: 🎨 Run SwiftLint Autocorrect # SwiftLint 자동 수정 실행
run: swiftlint --fix

- name: 🚀 Commit and Push Changes # 변경 사항 자동 커밋 및 푸시
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git fetch origin "${GITHUB_HEAD_REF}:${GITHUB_HEAD_REF}"
git checkout "${GITHUB_HEAD_REF}"

BRANCH_NAME="${GITHUB_HEAD_REF}"
if [[ "$BRANCH_NAME" =~ \#([0-9]+) ]]; then
ISSUE_NUMBER="${BASH_REMATCH[1]}"
else
ISSUE_NUMBER=""
fi

if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "style/#${ISSUE_NUMBER}: Apply SwiftLint autocorrect"
git push --set-upstream origin "${GITHUB_HEAD_REF}"
else
echo "No changes to commit"
fi

build:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build Flow를 여기서 정의하는 걸까요..? 신기합니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongglehada

ci 내부에 여러 jobs을 둘 수 있고 현재 총 두개의 job을 두고 있습니다.

  • autocorrect: 해당 job에 포함된 step에 따라 swiftlint 자동 수정 및 수정 내용 커밋
  • build: 스텝에 따라 빌드 환경을 구성한 뒤 빌드와 린트 테스트

이 두가지의 작업이 성공적으로 끝나면 PR이 병합될 수 있는 상태로 판단해줍니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

친절한 설명감사합니다.. 확인했습니다!

name: 🏗️ Build Workflow
runs-on: macos-15 # 최신 macOS 15 환경에서 실행
if: github.actor != 'github-actions[bot]' # Actions 봇 커밋은 무시

steps:
- name: Checkout Repository # 저장소 코드 체크아웃
uses: actions/checkout@v4

- name: ⚙️ Generate xcconfig
run: |
cat <<EOF > Poppool/Poppool/Resource/Debug.xcconfig
KAKAO_AUTH_APP_KEY=${{ secrets.KAKAO_AUTH_APP_KEY }}
NAVER_MAP_CLIENT_ID=${{ secrets.NAVER_MAP_CLIENT_ID }}
POPPOOL_BASE_URL=${{ secrets.POPPOOL_BASE_URL }}
POPPOOL_S3_BASE_URL=${{ secrets.POPPOOL_S3_BASE_URL }}
POPPOOL_API_KEY=${{ secrets.POPPOOL_API_KEY }}
EOF

- name: 🛠️ Select Xcode 16.2 # Xcode 16.2 버전 사용 설정
run: sudo xcode-select -s /Applications/Xcode_16.2.app

- name: ⬇️ Install SwiftLint # SwiftLint 설치
run: brew install swiftlint

- name: 🎨 Run SwiftLint # SwiftLint 코드 스타일 검사 실행
run: swiftlint

- name: 🔍 Detect Default Scheme # 기본 scheme 자동 검지
id: detect_scheme
run: |
SCHEME=$(xcodebuild -list -json | jq -r '.project.schemes[0]')
echo "Detected scheme: $SCHEME"
echo "scheme=$SCHEME" >> "$GITHUB_OUTPUT"

- name: 🔍 Detect Latest iPhone Simulator # 최신 사용 가능한 iPhone 시뮬레이터 검지
id: detect_latest_simulator
run: |
DEVICE=$(xcrun simctl list devices available | grep -Eo 'iPhone .* \([0-9A-F\-]+\)' | head -n 1)
UDID=$(echo "$DEVICE" | grep -Eo '[0-9A-F\-]{36}')
NAME=$(echo "$DEVICE" | cut -d '(' -f1 | xargs)
echo "Detected simulator: $NAME ($UDID)"
echo "sim_name=$NAME" >> "$GITHUB_OUTPUT"
echo "sim_udid=$UDID" >> "$GITHUB_OUTPUT"

- name: 🏗️ Build the project # 자동 검지된 Scheme과 Simulator로 빌드 수행
run: |
WORKSPACE=$(find . -name "*.xcworkspace" | head -n 1)
xcodebuild -scheme "${{ steps.detect_scheme.outputs.scheme }}" \
-workspace "$WORKSPACE" \
-destination "platform=iOS Simulator,id=${{ steps.detect_latest_simulator.outputs.sim_udid }}" \
clean build | xcpretty
50 changes: 14 additions & 36 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,43 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
# Xcode 관련
xcuserdata/
.DS_Store

# 개인 설정 및 비밀 정보
*.xcconfig

## Obj-C/Swift specific
# Objective-C / Swift 관련
*.hmap

## App packaging
# 앱 패키징
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
# Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Swift Package Manager (SPM)
.build/
# 패키지 관련 파일을 무시하고 싶다면 아래 항목을 활성화하세요.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods 디렉토리를 무시하고 싶다면 아래 항목을 활성화하세요.
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/
# Carthage 의존성을 무시하고 싶다면 아래 항목을 활성화하세요.
# Carthage/Checkouts

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

.DS_Store
Secrets.swift
19 changes: 19 additions & 0 deletions Poppool/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 기본 활성화된 룰 중에 비활성화할 룰을 지정
disabled_rules:
- type_body_length
- function_body_length
- file_length
- line_length
- force_cast
- force_try
- duplicate_conditions
- identifier_name
- cyclomatic_complexity
- redundant_optional_initialization

# 기본(default) 룰이 아닌 룰들을 활성화
opt_in_rules:
- sorted_imports
- direct_return
- file_header
- weak_delegate
8 changes: 0 additions & 8 deletions Poppool/AdminRepository\.swift

This file was deleted.

Loading