refactor: 뷰모델 팩토리를 뷰모델의 companion object에서 구현하는 방식으로 변경 (#125) #48
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 CI | |
on: | |
push: | |
branches: [ "develop-AN" ] | |
paths: | |
- 'android/**' | |
pull_request: | |
branches: [ "develop-AN" ] | |
paths: | |
- 'android/**' | |
defaults: | |
run: | |
working-directory: ./android | |
jobs: | |
ktlint_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Create local.properties | |
env: | |
BASE_URL: ${{ secrets.BASE_URL }} | |
TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
echo "sdk.dir=/Users/chaehyun/Library/Android/sdk" > ./local.properties | |
echo "base_url=$BASE_URL" >> ./local.properties | |
echo "token=$TOKEN" >> ./local.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Ktlint check | |
run: ./gradlew ktlintCheck | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Create local.properties | |
env: | |
BASE_URL: ${{ secrets.BASE_URL }} | |
TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
echo "sdk.dir=/Users/chaehyun/Library/Android/sdk" > ./local.properties | |
echo "base_url=$BASE_URL" >> ./local.properties | |
echo "token=$TOKEN" >> ./local.properties | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Gradle Clean check | |
run: ./gradlew clean | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Run Unit Test | |
run: ./gradlew test |