Skip to content

TOP-84 Design 회원가입 디자인 QA 반영 #287

TOP-84 Design 회원가입 디자인 QA 반영

TOP-84 Design 회원가입 디자인 QA 반영 #287

Workflow file for this run

name: Android CI
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Access APP_GOOGLE_SERVICES_JSON
run: echo '${{ secrets.APP_GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Access DATA_GOOGLE_SERVICES_JSON
run: echo '${{ secrets.DATA_GOOGLE_SERVICES_JSON }}' > ./data/google-services.json
- name: Add Key Info into local.properties
run: |
touch ./local.properties
echo -e KAKAO_NATIVE_APP_KEY=\"$KAKAO_NATIVE_APP_KEY\" >> ./local.properties
echo -e NAVER_CLIENT_ID=\"$NAVER_CLIENT_ID\" >> ./local.properties
echo -e NAVER_CLIENT_SECRET=\"$NAVER_CLIENT_SECRET\" >> ./local.properties
echo -e REGION_CODE_SERVICE_KEY=\"$REGION_CODE_SERVICE_KEY\" >> ./local.properties
echo -e APP_EMAIL_ID=\"$APP_EMAIL_ID\" >> ./local.properties
echo -e APP_EMAIL_PASSWORD=\"$APP_EMAIL_PASSWORD\" >> ./local.properties
echo -e CEO_EMAIL=\"$CEO_EMAIL\" >> ./local.properties
cat ./local.properties
env:
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
REGION_CODE_SERVICE_KEY: ${{ secrets.REGION_CODE_SERVICE_KEY }}
APP_EMAIL_ID: ${{ secrets.APP_EMAIL_ID }}
APP_EMAIL_PASSWORD: ${{ secrets.APP_EMAIL_PASSWORD }}
CEO_EMAIL: ${{ secrets.CEO_EMAIL }}
- name: Build with Gradle Without Test
run: ./gradlew build -x test
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Access APP_GOOGLE_SERVICES_JSON
run: echo '${{ secrets.APP_GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
- name: Access DATA_GOOGLE_SERVICES_JSON
run: echo '${{ secrets.DATA_GOOGLE_SERVICES_JSON }}' > ./data/google-services.json
- name: Add Key Info into local.properties
run: |
touch ./local.properties
echo -e KAKAO_NATIVE_APP_KEY=\"$KAKAO_NATIVE_APP_KEY\" >> ./local.properties
echo -e NAVER_CLIENT_ID=\"$NAVER_CLIENT_ID\" >> ./local.properties
echo -e NAVER_CLIENT_SECRET=\"$NAVER_CLIENT_SECRET\" >> ./local.properties
echo -e REGION_CODE_SERVICE_KEY=\"$REGION_CODE_SERVICE_KEY\" >> ./local.properties
echo -e APP_EMAIL_ID=\"$APP_EMAIL_ID\" >> ./local.properties
echo -e APP_EMAIL_PASSWORD=\"$APP_EMAIL_PASSWORD\" >> ./local.properties
echo -e CEO_EMAIL=\"$CEO_EMAIL\" >> ./local.properties
cat ./local.properties
env:
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
REGION_CODE_SERVICE_KEY: ${{ secrets.REGION_CODE_SERVICE_KEY }}
APP_EMAIL_ID: ${{ secrets.APP_EMAIL_ID }}
APP_EMAIL_PASSWORD: ${{ secrets.APP_EMAIL_PASSWORD }}
CEO_EMAIL: ${{ secrets.CEO_EMAIL }}
- name: Run unit tests
run: ./gradlew testDebugUnitTest
- name: Create android test report
uses: asadmansr/[email protected]
if: ${{ always() }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Add Key Info into local.properties
run: |
touch ./local.properties
echo -e KAKAO_NATIVE_APP_KEY=\"$KAKAO_NATIVE_APP_KEY\" >> ./local.properties
echo -e NAVER_CLIENT_ID=\"$NAVER_CLIENT_ID\" >> ./local.properties
echo -e NAVER_CLIENT_SECRET=\"$NAVER_CLIENT_SECRET\" >> ./local.properties
echo -e REGION_CODE_SERVICE_KEY=\"$REGION_CODE_SERVICE_KEY\" >> ./local.properties
echo -e APP_EMAIL_ID=\"$APP_EMAIL_ID\" >> ./local.properties
echo -e APP_EMAIL_PASSWORD=\"$APP_EMAIL_PASSWORD\" >> ./local.properties
echo -e CEO_EMAIL=\"$CEO_EMAIL\" >> ./local.properties
cat ./local.properties
env:
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
REGION_CODE_SERVICE_KEY: ${{ secrets.REGION_CODE_SERVICE_KEY }}
APP_EMAIL_ID: ${{ secrets.APP_EMAIL_ID }}
APP_EMAIL_PASSWORD: ${{ secrets.APP_EMAIL_PASSWORD }}
CEO_EMAIL: ${{ secrets.CEO_EMAIL }}
- name: Run ktlint
run: ./gradlew ktlintCheck --stacktrace
- name: Run detekt
run: ./gradlew detekt
alert:
runs-on: ubuntu-latest
needs: [build, lint, test]
steps:
- name: action-slack
uses: 8398a7/[email protected]
with:
status: ${{ job.status }}
author_name: THT-Android CI
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
custom_payload: |
{
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_WORKFLOW}\n${process.env.AS_JOB} (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@${process.env.AS_REF} by ${process.env.AS_AUTHOR} ${{ job.status }} in ${process.env.AS_TOOK}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.