Skip to content

[AN] ์Šคํ„ฐ๋”” ๊ฐœ์„ค ๋ทฐ ๋ฆฌํŽ™ํ„ฐ๋ง #254

[AN] ์Šคํ„ฐ๋”” ๊ฐœ์„ค ๋ทฐ ๋ฆฌํŽ™ํ„ฐ๋ง

[AN] ์Šคํ„ฐ๋”” ๊ฐœ์„ค ๋ทฐ ๋ฆฌํŽ™ํ„ฐ๋ง #254

Workflow file for this run

name: Android TEST CI
on:
pull_request:
branches: [ "develop" ]
paths:
- "android/**"
permissions:
checks: write
pull-requests: write
jobs:
android-test:
runs-on: ubuntu-latest
env:
working-directory: ./android
steps:
- uses: actions/checkout@v3
- name: gradle ์บ์‹ฑ
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Java JDK 17 ์„ธํŒ…
if: steps.cache-jdk.outputs.cache-hit != 'true'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: keyStore ์„ธํŒ…
env:
KEY_STORE: ${{ secrets.KEY_STORE }}
run: |
echo -n "$KEY_STORE" > team201.jks
base64 -d -i team201.jks
working-directory: ${{ env.working-directory }}
- name: keystore properties ์ƒ์„ฑ
run: touch keystore.properties
working-directory: ${{ env.working-directory }}
- name: keystore properties ์„ธํŒ…
env:
KEY_STORE_PROPERTIES: ${{ secrets.KEY_STORE_PROPERTIES }}
run:
echo -e "$KEY_STORE_PROPERTIES" >> keystore.properties
working-directory: ${{ env.working-directory }}
- name: local properties ์ƒ์„ฑ
run: touch local.properties
working-directory: ${{ env.working-directory }}
- name: local properties ์„ธํŒ…
env:
BASE_URL: ${{ secrets.BASE_URL }}
BASE_TEST_URL: ${{ secrets.BASE_TEST_URL }}
POLICY: ${{ secrets.POLICY }}
FIREBASE_APP_VERSION_COLLECTION: ${{ secrets.FIREBASE_APP_VERSION_COLLECTION }}
GIT_HUB_TEST_URL: ${{ secrets.GIT_HUB_TEST_URL }}
GIT_HUB_URL: ${{ secrets.GIT_HUB_URL }}
run:
echo -e "BASE_URL=\"$BASE_URL\"\n
BASE_TEST_URL=\"$BASE_TEST_URL\"\n
POLICY=\"$POLICY\"\n
FIREBASE_APP_VERSION_COLLECTION=\"$FIREBASE_APP_VERSION_COLLECTION\"\n
GIT_HUB_TEST_URL=\"$GIT_HUB_TEST_URL\"\n
GIT_HUB_URL=\"$GIT_HUB_URL\"" >> local.properties
working-directory: ${{ env.working-directory }}
- name: google-services json ์ƒ์„ฑ
run: touch google-services.json
working-directory: ${{ env.working-directory }}/app
- name: google-services json ์„ธํŒ…
env:
GOOGLE: ${{ secrets.GOOGLE }}
run: echo "$GOOGLE" >> google-services.json
working-directory: ${{ env.working-directory }}/app
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: ${{ env.working-directory }}
- name: test ์ง„ํ–‰
run: ./gradlew test
working-directory: ${{ env.working-directory }}
- name: test ๊ฒฐ๊ณผ
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: |
${{ env.working-directory }}/app/build/test-results/*Debug*/*.xml
${{ env.working-directory }}/domain/build/test-results/test/*.xml
- name: ํ…Œ์ŠคํŠธ ์‹คํŒจ slack ์•Œ๋ฆผ
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: ์•ˆ๋“œ๋กœ์ด๋“œ ํ…Œ์ŠคํŠธ ์‹คํŒจ ์•Œ๋ฆผ
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()