[Feature] 에러 처리를 합니다. #226
Workflow file for this run
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 Build Test Lint CI | |
on: | |
push: | |
branches: | |
- "main" | |
- "develop" | |
- "Release/*" | |
pull_request: | |
branches: | |
- "main" | |
- "develop" | |
- "Release/*" | |
jobs: | |
pre-steps: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Load Google Service file | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA | base64 -di > app/google-services.json | |
- name: Create local.properties | |
env: | |
LOCAL_PROPERTIES_CONTENTS: ${{ secrets.LOCAL_PROPERTIES_CONTENTS }} | |
run: echo "${LOCAL_PROPERTIES_CONTENTS}" > local.properties | |
build: | |
runs-on: ubuntu-latest | |
needs: pre-steps | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Gradle for Build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-build- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build All Modules | |
run: ./gradlew assemble | |
test: | |
runs-on: ubuntu-latest | |
needs: pre-steps | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Gradle for Test | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-test-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-test- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Run All Tests | |
run: ./gradlew test | |
lint: | |
runs-on: ubuntu-latest | |
needs: pre-steps | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Gradle for Lint | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-lint-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-lint- | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Run Lint Check | |
run: ./gradlew ktlintCheck |