๐ ๏ธ fastlane ci ๊ตฌ์ถ #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# workflow ์ด๋ฆ | |
name: test-CI | |
# workflow๊ฐ ์ธ์ ์คํ๋ ์ง์ ๋ํ ์ค๋ช (When) | |
on: | |
# main ๋ธ๋์น์ pr์ ์ฌ๋ฆฌ๋ ๊ฒฝ์ฐ(main ๋ธ๋์น์์ ๋ถ๊ธฐํ ๋ธ๋์น๋ ์คํ๋๋ค.) | |
pull_request: | |
branches: | |
- 'dev' | |
# workflow๊ฐ ์ด๋ป๊ฒ ์คํ๋ ์ง์ ๋ํ ์ค๋ช (How) | |
jobs: | |
build: # ๋น๋ ๋ฐ ํ ์คํธ ์์ ์ ์ | |
runs-on: macos-latest # macOS ํ๊ฒฝ์์ ์ํฌํ๋ก ์คํ (iOS ํ๋ก์ ํธ๋ฅผ ์ํด macOS ํ์) | |
defaults: | |
run: | |
working-directory: ./pennyway-client-iOS # ์์ ๋๋ ํ ๋ฆฌ๋ฅผ fastlane์ด ํฌํจ๋ iOS ํ๋ก์ ํธ ํด๋๋ก ์ค์ | |
steps: | |
- uses: actions/checkout@v2 # ๋ฆฌํฌ์งํ ๋ฆฌ ์ฝ๋๋ฅผ ํ์ฌ ์์ ๋๋ ํ ๋ฆฌ๋ก ์ฒดํฌ์์ | |
- uses: ruby/setup-ruby@v1 # Ruby ํ๊ฒฝ ์ค์ | |
with: | |
ruby-version: 2.7 # ํ๋ก์ ํธ์์ ์ฌ์ฉํ Ruby ๋ฒ์ ๋ช ์ | |
- name: Create xcconfig files | |
run: | | |
echo "${{ secrets.TEST_CONFIG }}" > ./pennyway-client-iOS/Xcconfig/Test.xcconfig | |
echo "${{ secrets.RELEASE_CONFIG }}" > ./pennyway-client-iOS/Xcconfig/Release.xcconfig | |
echo "${{ secrets.DEBUG_CONFIG }}" > ./pennyway-client-iOS/Xcconfig/Debug.xcconfig | |
echo "${{ secrets.SECRETS_CONFIG }}" > ./pennyway-client-iOS/Xcconfig/Secrets.xcconfig | |
- name: Install Bundler # Ruby ์์กด์ฑ ๊ด๋ฆฌ ๋๊ตฌ(Bundler) ์ค์น | |
run: gem install bundler -v 2.4.22 | |
- name: Install Fastlane # Fastlane ์ค์น (iOS CI/CD๋ฅผ ์ํ ๋๊ตฌ) | |
run: brew install fastlane | |
- name: Verify Fastlane Installation # Fastlane์ด ์ ๋๋ก ์ค์น๋์๋์ง ํ์ธ | |
run: fastlane --version | |
- name: Install dependencies # Gemfile์ ์ ์๋ Ruby ์์กด์ฑ ์ค์น | |
run: bundle _2.4.22_ install | |
- name: Install Pod | |
run: pod install --repo-update --clean-install | |
- name: Run tests with Fastlane # Fastlane์ ์ฌ์ฉํด ํ ์คํธ ์คํ | |
run: bundle exec fastlane tests |