Merge pull request #44 from Minsu-Lee/feature/textfield-refactor #26
This file contains hidden or 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 | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| develop-build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| # build-logic/src/**/*.kt 추가: Convention Plugin Kotlin 소스는 .gradle* 패턴에 매칭되지 않아 | |
| # 플러그인 로직만 변경 시 캐시가 갱신되지 않는 문제를 방지 | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build-logic/src/**/*.kt', 'gradle/libs.versions.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run unit tests | |
| id: unit-test | |
| run: ./gradlew testDebugUnitTest --no-daemon --info | |
| continue-on-error: true | |
| env: | |
| GOOGLE_WEB_CLIENT_ID: ${{ secrets.GOOGLE_WEB_CLIENT_ID }} | |
| - name: Run Lint Debug | |
| id: lint | |
| run: ./gradlew lintDebug --no-daemon --info | |
| continue-on-error: true | |
| env: | |
| GOOGLE_WEB_CLIENT_ID: ${{ secrets.GOOGLE_WEB_CLIENT_ID }} | |
| - name: Upload Lint Debug Result | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: lint-result | |
| path: '**/build/reports/lint-results-debug.html' | |
| - name: Upload Test Result | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-result | |
| path: '**/build/reports/tests' | |
| - name: Check results | |
| if: always() | |
| run: | | |
| if [ "${{ steps.unit-test.outcome }}" = "failure" ] || \ | |
| [ "${{ steps.lint.outcome }}" = "failure" ]; then | |
| exit 1 | |
| fi |