[feat #82] :: 홈 화면 퍼블리싱 #155
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
name: Kotlin Multiplatform CI | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
ktlint: | |
name: Run ktlint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK for Ktlint | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Ktint set up | |
run: curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.50.0/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/ | |
- run: ktlint '!**/build/**' | |
android: | |
name: Build Android | |
runs-on: ubuntu-latest | |
needs: ktlint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK for Android | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Create google-services.json | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo "$DATA" > /home/runner/work/DMS-KMP/DMS-KMP/composeApp/google-services.json | |
- name: Build Android target | |
run: ./gradlew assembleDebug --stacktrace | |
- name: Run Android tests | |
run: ./gradlew test --stacktrace | |
desktop: | |
name: Build Desktop | |
runs-on: ubuntu-latest | |
needs: ktlint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK for Desktop | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build Desktop target | |
run: ./gradlew jvmMainClasses --stacktrace | |
- name: Run Desktop tests | |
run: ./gradlew jvmTest --stacktrace | |
ios: | |
name: Build iOS | |
runs-on: macos-latest | |
needs: ktlint | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up JDK for iOS | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Install Xcode version | |
run: sudo xcode-select --switch /Applications/Xcode_15.1.app | |
- name: Set up CocoaPods | |
run: | | |
brew install cocoapods | |
pod repo update | |
- name: Build iOS target | |
run: ./gradlew iosX64MainBinaries | |
- name: Run iOS tests | |
run: ./gradlew iosX64Test --stacktrace |