Update work to v2.10.0 #476
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: Code Analysis | |
on: | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
detekt: | |
runs-on: ubuntu-latest | |
env: | |
HIOR_PATH_R: ${{ secrets.HIOR_PATH_R }} | |
HIOR_KEY_PASS_R: ${{ secrets.HIOR_KEY_PASS_R }} | |
HIOR_STORE_PASS_R: ${{ secrets.HIOR_STORE_PASS_R }} | |
HIOR_ALIAS_R: ${{ secrets.HIOR_ALIAS_R }} | |
ENCODED_STRING_R: ${{ secrets.HIOR_KEYSTORE_R }} | |
HIOR_PATH_D: ${{ secrets.HIOR_PATH_D }} | |
HIOR_KEY_PASS_D: ${{ secrets.HIOR_KEY_PASS_D }} | |
HIOR_STORE_PASS_D: ${{ secrets.HIOR_STORE_PASS_D }} | |
HIOR_ALIAS_D: ${{ secrets.HIOR_ALIAS_D }} | |
ENCODED_STRING_D: ${{ secrets.HIOR_KEYSTORE_D }} | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Setup Gradle Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Decode google-services.json | |
run: echo "$GOOGLE_SERVICES_JSON" | base64 --decode > app/google-services.json | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Restore release keystore.jks | |
run: echo $ENCODED_STRING_R | base64 -d > ./release.keystore.jks | |
- name: Restore debug keystore.jks | |
run: echo $ENCODED_STRING_D | base64 -d > ./debug.keystore.jks | |
- name: Run Detekt | |
run: ./gradlew detekt | |
- name: Run Ktlint | |
run: ./gradlew ktlintCheck | |
- name: Run tests and generate Aggregated JaCoCo report | |
run: ./gradlew test jacocoAggregatedReport | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./build/reports/jacoco/jacocoAggregatedReport/jacocoTestReport.xml | |
fail_ci_if_error: true |