Skip to content

Conversation

@0Hooni
Copy link
Member

@0Hooni 0Hooni commented Apr 2, 2025

📌 이슈

✅ 작업 사항

  • Swiftlint 적용
    • lint rules 파일 추가
    • 관련 세팅을 위한 빌드 파일 수정
  • CI 깃허브 액션 추가
  • Swiftlint autocorrect 깃허브 액션 추가
  • secrets.swift → Debug.xcconfig 수정 작업
    • 빌드 세팅 수정
    • .gitignore 수정
    • 기존 코드가 변경된 키를 추적할 수 있도록 수정
  • 불필요한 파일, 타겟 제거
    • 사용하지 않던 테스트 타겟(Unit test, UI test) 제거
    • 디렉토리에 사용하지 않던 파일(AdminRepository/.swift) 제거

🚀 테스트 방식

Swiftlint 테스트

  • 노션에 프로젝트 세팅 문서의 "swiftlint 적용 과정"의 1번을 참고하여 swiftlint 설치
  • 93번 브랜치에서 프로젝트 빌드

깃허브 액션 테스트

  • 현재 PR을 오픈하여 적용된 깃허브 액션 적용 테스트 예정

변경된 Key 관리 테스트

  • Swiftlint로 인해서 일반적인 상황으로는 빌드가 안됨
  • 에러가 되는 린트 룰을 .swiftlint.yml 파일에서 비활성화 하여 빌드하여 테스트

👀 ETC (추후 개발해야 할 것, 참고자료 등) ->

Caution

이번 PR을 통해 Secrets.swift의 추적 제한이 풀렸습니다❗
PR이 병합되고 난 후 반드시 Secrets.swift를 디렉토리에서 제거하고, 작업자의 커밋에 포함되지 않았는지 꼭 확인해주세요❗❗❗

0Hooni added 18 commits March 30, 2025 18:44
- 컨벤션 파일 제거로 인한 빌드 파일 수정
- Run SwiftLint 스크립트 추가
- SwiftLint rule 파일 추가
- Build 테스트 포함
- Swiftlint 테스트 포함
- Debug.xcconfig를 Resource 폴더에 추가함
- 해당 파일은 ignore로 걸러지도록 함
- info에 Key의 이름을 등록해두어 Bundle로 찾도록 설정
- 새로운 Debug.xcconfig를 무시하도록 수정
- 기존 ignore 설정을 보기 쉽게 정리
- Secrets.swift의 enum을 열도록 할 예정
- 해당 파일에서 Key 호출을 위한 여러 컴퓨티드 프로퍼티 제공
- 변경된 프로퍼티에 맞게 호출 코드도 일부 수정
- 깃헙 액션에 맞게 파일 이름 수정
- CI → ci
- Swiftlint autocorrect → swiftlint-autocorrect
- 추가로 autocorrect의 작동 시기를 Push → PR open으로 수정하여 깃액션 작동 빈도를 줄임
- Secrets enum을 대체할 KeyPath enum을 추가
- gitignore에서 Secrets.swift 추적 제한 제거
- 빌드 파일 수정
@0Hooni 0Hooni added 🚀 feat 새로운 기능을 추가 🔧 chore 빌드 설정, 프로젝트 설정 등 “로직에 영향 없는” 변경 🗑️ remove 파일 삭제 labels Apr 2, 2025
@0Hooni 0Hooni self-assigned this Apr 2, 2025
@0Hooni 0Hooni linked an issue Apr 2, 2025 that may be closed by this pull request
@0Hooni 0Hooni marked this pull request as draft April 2, 2025 15:10
@0Hooni
Copy link
Member Author

0Hooni commented Apr 2, 2025

스크린샷 2025-04-03 오전 12 22 14

성공적인 첫 CI 🥹

@0Hooni
Copy link
Member Author

0Hooni commented Apr 2, 2025

🥹 자동 수정이랑 빌드 테스트 전부 작동 테스트 완료 🥹

스크린샷 2025-04-03 오전 1 11 19

자동 수정으로 줄어들은 warning 수(4000 → 100 실화?!?!?)

스크린샷 2025-04-03 오전 1 12 53

@0Hooni 0Hooni marked this pull request as ready for review April 2, 2025 16:15
@0Hooni 0Hooni added 🔄 refactor 프로덕션 코드 리팩토링, 파일 삭제, 네이밍 수정 및 폴더링 🎨 style 코드 스타일 수정, 컨벤션 적용 🐛 fix 버그 수정, 잔잔바리 수정, 병합 시 충돌 해결 labels Apr 3, 2025
0Hooni and others added 3 commits April 3, 2025 19:42
…pply-CI-with-swiftlint

# Conflicts:
#	Poppool/Poppool/Application/AppDelegate.swift
#	Poppool/Poppool/Presentation/Admin/AdminRegister/PopUpStoreRegisterViewController.swift
#	Poppool/Poppool/Presentation/Admin/Data/MapDomain/MapPopUpStore.swift
#	Poppool/Poppool/Presentation/Map/Common/GMSMapViewDelegateProxy.swift
#	Poppool/Poppool/Presentation/Map/Common/MapUtilities.swift
#	Poppool/Poppool/Presentation/Map/FillterSheetView/FilterBottomSheetView.swift
#	Poppool/Poppool/Presentation/Map/FillterSheetView/FilterBottomSheetViewController.swift
#	Poppool/Poppool/Presentation/Map/FindMap/MapGuideView/FullScreenMapViewController.swift
#	Poppool/Poppool/Presentation/Map/FindMap/MapGuideView/MapGuideViewController.swift
#	Poppool/Poppool/Presentation/Map/MapView/MapMarker.swift
#	Poppool/Poppool/Presentation/Map/MapView/MapView.swift
#	Poppool/Poppool/Presentation/Map/MapView/MapViewController.swift

Co-Authored-By: ki hyeon kim <[email protected]>
@0Hooni 0Hooni linked an issue Apr 3, 2025 that may be closed by this pull request
@0Hooni 0Hooni changed the title CI & Swiftlint autocorrect 깃허브 액션 추가 [FEAT] CI & Swiftlint autocorrect 깃허브 액션 추가 Apr 4, 2025
Copy link
Member

@dongglehada dongglehada left a comment

Choose a reason for hiding this comment

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

시크릿에서 키패스로 변경이 되었군요 변경상항은 확인 하였습니다! 정리해주신 내용 확인해보겠습니다!

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.

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

echo "No changes to commit"
fi

build:
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@0Hooni 0Hooni merged commit 9ebc3b6 into dev Apr 5, 2025
2 checks passed
@0Hooni 0Hooni deleted the style/#93-apply-CI-with-swiftlint branch April 5, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 chore 빌드 설정, 프로젝트 설정 등 “로직에 영향 없는” 변경 🚀 feat 새로운 기능을 추가 🐛 fix 버그 수정, 잔잔바리 수정, 병합 시 충돌 해결 🔄 refactor 프로덕션 코드 리팩토링, 파일 삭제, 네이밍 수정 및 폴더링 🗑️ remove 파일 삭제 🎨 style 코드 스타일 수정, 컨벤션 적용

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swiftlint & CI 적용하기

4 participants