[Feat] 웹소켓 연결 #414 #451
This file contains hidden or 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: Android CI (dev) | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| pull_request: | |
| branches: [ "dev" ] | |
| jobs: | |
| dev-ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Decode google-services.json | |
| env: | |
| GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_DEV_BASE64 }} | |
| run: | | |
| echo "Decoding google-services.json..." | |
| mkdir -p app/src/debug | |
| echo $GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > app/src/debug/google-services.json | |
| echo "google-services.json created successfully." | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Create local.properties | |
| run: | | |
| echo "COGNITO_USER_POOL_ID_DEV=${{ secrets.COGNITO_USER_POOL_ID_DEV }}" >> local.properties | |
| echo "COGNITO_APP_CLIENT_ID_DEV=${{ secrets.COGNITO_APP_CLIENT_ID_DEV }}" >> local.properties | |
| echo "COGNITO_REGION_DEV=${{ secrets.COGNITO_REGION_DEV }}" >> local.properties | |
| echo "KAKAO_NATIVE_APP_KEY=${{ secrets.KAKAO_NATIVE_APP_KEY_DEV }}" >> local.properties | |
| echo "KAKAO_REST_API_KEY=${{ secrets.KAKAO_REST_API_KEY }}" >> local.properties | |
| shell: bash | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Run Android Lint | |
| run: ./gradlew lint | |
| - name: Run Ktlint Check | |
| run: ./gradlew ktlintCheck | |
| - name: Run Unit Tests | |
| run: ./gradlew testDebugUnitTest | |
| - name: Build Debug APK | |
| run: ./gradlew assembleDebug | |
| - name: Check for APK | |
| run: | | |
| echo "Checking the contents of the build output directory..." | |
| ls -R app/build/outputs/apk | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools | |
| - name: Upload Debug APK to Firebase App Distribution | |
| run: | | |
| firebase appdistribution:distribute app/build/outputs/apk/debug/app-debug.apk \ | |
| --app ${{ secrets.FIREBASE_APP_DEV_ID }} \ | |
| --release-notes "CI build from dev branch (via CLI)" \ | |
| --groups "testers" \ | |
| --token ${{ secrets.FIREBASE_TOKEN }} |