Merge pull request #245 from its-me-debk007/dependabot/gradle/android… #276
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: detekt code smell analysis + run unit tests + build & upload apk | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: "oracle" | |
| java-version: 17 | |
| - name: Make Gradle executable | |
| run: chmod +x ./gradlew | |
| - name: detekt check | |
| run: ./gradlew detekt | |
| - name: Upload detekt check report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: detekt-results-debug | |
| path: app/build/reports/detekt/detekt.html | |
| - name: Perform unit tests | |
| run: ./gradlew test | |
| - name: Upload unit test report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit_test_report | |
| path: app/build/reports/tests/testDebugUnitTest/ | |
| - name: Build Debug APK | |
| # adding '-x validateSigningDebug' as it fails the CI. | |
| # TODO: To be removed for actual template use | |
| run: ./gradlew assembleDebug -x validateSigningDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-debug | |
| path: app/build/outputs/apk/debug/app-debug.apk |