diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..9067f16 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,90 @@ +name: Android CI/CD + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - 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: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew assembleDebug + + - name: Run unit tests + run: ./gradlew test + + - name: Upload test reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-reports + path: app/build/reports/tests/ + + distribute: + needs: build-and-test # build-and-test가 성공해야 실행 + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') # push to main/develop만 + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + bundler-cache: true + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - 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: Decode Firebase service account + env: + FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }} + run: | + echo $FIREBASE_SECRET | base64 --decode > firebase-service-account.json + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Run Fastlane distribute + run: bundle exec fastlane distribute \ No newline at end of file diff --git a/.gitignore b/.gitignore index dfb30dc..e33db2e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,23 @@ captures/ # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild -.cxx/ \ No newline at end of file +.cxx/ + + +# macOS +.DS_Store + +# Gradle +.gradle/ +build/ + +# Firebase Service Account +firebase-service-account.json +hsconnect-*.json + + +# Fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output \ No newline at end of file diff --git a/.gradle/8.13/checksums/checksums.lock b/.gradle/8.13/checksums/checksums.lock deleted file mode 100644 index 268b449..0000000 Binary files a/.gradle/8.13/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/8.13/executionHistory/executionHistory.bin b/.gradle/8.13/executionHistory/executionHistory.bin deleted file mode 100644 index 646c5f3..0000000 Binary files a/.gradle/8.13/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/8.13/executionHistory/executionHistory.lock b/.gradle/8.13/executionHistory/executionHistory.lock deleted file mode 100644 index b0d6921..0000000 Binary files a/.gradle/8.13/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/8.13/fileChanges/last-build.bin b/.gradle/8.13/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/.gradle/8.13/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/8.13/fileHashes/fileHashes.bin b/.gradle/8.13/fileHashes/fileHashes.bin deleted file mode 100644 index cf80b29..0000000 Binary files a/.gradle/8.13/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/8.13/fileHashes/fileHashes.lock b/.gradle/8.13/fileHashes/fileHashes.lock deleted file mode 100644 index 1d2673a..0000000 Binary files a/.gradle/8.13/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/8.13/fileHashes/resourceHashesCache.bin b/.gradle/8.13/fileHashes/resourceHashesCache.bin deleted file mode 100644 index 7e0d3e3..0000000 Binary files a/.gradle/8.13/fileHashes/resourceHashesCache.bin and /dev/null differ diff --git a/.gradle/8.13/gc.properties b/.gradle/8.13/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index 81c473e..0000000 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index f011b80..0000000 --- a/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Fri Oct 10 14:17:20 KST 2025 -gradle.version=8.13 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 72d0d4d..0000000 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/.gradle/config.properties b/.gradle/config.properties deleted file mode 100644 index 5452bc1..0000000 --- a/.gradle/config.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Mon Oct 13 17:27:02 KST 2025 -java.home=C\:\\Program Files\\Android\\Android Studio\\jbr diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe deleted file mode 100644 index 734e661..0000000 Binary files a/.gradle/file-system.probe and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml index e5628ed..5c90e4f 100644 --- a/.idea/caches/deviceStreaming.xml +++ b/.idea/caches/deviceStreaming.xml @@ -51,6 +51,18 @@ diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 639c779..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index c58f128..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -