Merge pull request #1 from mabualzait/feature/logcat #19
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - 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 | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # Code quality checks temporarily disabled | |
| # - name: Run ktlint check | |
| # run: ./gradlew ktlintCheck | |
| # - name: Run detekt | |
| # run: ./gradlew detekt | |
| # - name: Run unit tests | |
| # run: ./gradlew test | |
| # Instrumented tests temporarily disabled | |
| # - name: Run instrumented tests | |
| # uses: reactivecircus/android-emulator-runner@v2 | |
| # with: | |
| # api-level: 29 | |
| # script: ./gradlew connectedAndroidTest | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease | |
| # Test results upload temporarily disabled | |
| # - name: Upload test results | |
| # uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: test-results | |
| # path: | | |
| # debugdrawer/build/reports/ | |
| # sampleapp/build/reports/ | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apk | |
| path: | | |
| sampleapp/build/outputs/apk/debug/sampleapp-debug.apk | |
| sampleapp/build/outputs/apk/release/sampleapp-release.apk | |
| # Code quality job temporarily disabled | |
| # code-quality: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - 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 | |
| # key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-gradle- | |
| # - name: Grant execute permission for gradlew | |
| # run: chmod +x gradlew | |
| # - name: Run ktlint check | |
| # run: ./gradlew ktlintCheck | |
| # - name: Run detekt | |
| # run: ./gradlew detekt | |
| # continue-on-error: true | |
| # - name: Upload detekt report | |
| # uses: actions/upload-artifact@v4 | |
| # if: always() | |
| # with: | |
| # name: detekt-report | |
| # path: | | |
| # debugdrawer/build/reports/detekt/ | |
| # sampleapp/build/reports/detekt/ | |
| # Coverage job temporarily disabled | |
| # coverage: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - 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 | |
| # key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-gradle- | |
| # - name: Grant execute permission for gradlew | |
| # run: chmod +x gradlew | |
| # - name: Run tests with coverage | |
| # run: ./gradlew jacocoTestReport | |
| # continue-on-error: true | |
| # - name: Upload coverage reports | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: coverage-reports | |
| # path: | | |
| # debugdrawer/build/reports/jacoco/ | |
| # sampleapp/build/reports/jacoco/ | |
| # - name: Upload coverage to Codecov | |
| # uses: codecov/codecov-action@v4 | |
| # with: | |
| # files: | | |
| # debugdrawer/build/reports/jacoco/test/jacocoTestReport.xml | |
| # sampleapp/build/reports/jacoco/test/jacocoTestReport.xml | |
| # fail_ci_if_error: true |