이것도 되나? #2
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: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: JDK 17 설정 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- 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: gradlew 실행 권한 부여 | |
run: chmod +x gradlew | |
- name: Gradle 빌드 | |
run: ./gradlew build --no-daemon --parallel | |
- name: 코틀린 스타일 테스트 | |
run: ./gradlew ktlintCheck | |
- name: Kotlin 스타일 테스트 | |
run: ./gradlew detekt | |
- name: Android Lint 테스트 | |
run: ./gradlew lint | |
- name: 프로젝트 Unit 테스트 | |
run: ./gradlew testDebugUnitTest |