[AN] 놀이터 기능 데모데이에서 발생한 오류 수정 (#724) #509
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: Android Pull Request CI | |
on: | |
push: | |
branches: [ develop ] | |
paths: | |
- 'android/**' | |
pull_request: | |
branches: [ develop ] | |
paths: | |
- 'android/**' | |
defaults: | |
run: | |
working-directory: ./android | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
# needed unless run with comment_mode: off | |
pull-requests: write | |
# only needed for private repository | |
contents: read | |
# only needed for private repository | |
issues: read | |
# required by download step to access artifacts API | |
actions: read | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Gradle cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: set up Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Create local.properties | |
env: | |
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} | |
run: | | |
echo "$LOCAL_PROPERTIES" > local.properties | |
- name: Create keystore.properties | |
env: | |
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }} | |
run: | | |
echo "$KEYSTORE_PROPERTIES" > keystore.properties | |
- name: Create keystore directory | |
run: mkdir -p /home/runner/work/2024-friendogly/2024-friendogly/android/app/keystore | |
- name: Putting data | |
env: | |
DATA: ${{ secrets.RELEASE_KEYSTORE }} | |
run: echo $DATA > base64 -d > /home/runner/work/2024-friendogly/2024-friendogly/android/app/keystore/friendogly.jks | |
- name: Create release-keystore | |
env: | |
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }} | |
run: | | |
touch ../android/app/keystore/friendogly.jks | |
echo RELEASE_KEYSTORE >> ../android/app/keystore/friendogly.jks | |
cat ../android/app/keystore/friendogly.jks | |
- name: Create google-services.json | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: | | |
touch ../android/app/google-services.json | |
echo GOOGLE_SERVICES_JSON >> ../android/app/google-services.json | |
cat ../android/app/google-services.json | |
- name: Lint Check | |
run: ./gradlew ktlintCheck | |
- name: Upload Event File | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} | |
- name: Create file | |
run: cat /home/runner/work/2024-friendogly/2024-friendogly/android/app/google-services.json | base64 | |
- name: Putting data | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA > /home/runner/work/2024-friendogly/2024-friendogly/android/app/google-services.json | |
- name: Run unit tests | |
run: ./gradlew testDebugUnitTest --stacktrace | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test Results | |
path: "**/test-results/**/*.xml" |