* Add Kotlin Kover * Add AuthKtorConfiguration tests * Ensure at least 25% code coverage * Exclude Previews from code coverage * Specify Kover report path for SonarQube * Add Kover xml report task * Extract sonar to a separate step * Add some exclusions and minimum coverage * Exclude Hilt-generated classes * Add shopping list view model tests * Reduce the coverage requirement
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: Check
|
|
|
|
on: [ pull_request ]
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: ashutoshgngwr/validate-fastlane-supply-metadata@d03bc88bf15d7c2ef8682fa057afbf2e4bc85fb4
|
|
with:
|
|
fastlaneDir: ./fastlane/metadata/android
|
|
usePlayStoreLocales: true
|
|
|
|
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a
|
|
|
|
- name: Checks
|
|
run: ./gradlew check :app:koverXmlReportRelease :app:koverVerifyRelease
|
|
|
|
- name: SonarCloud
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
run: ./gradlew sonar
|
|
|
|
- name: Publish test reports
|
|
uses: mikepenz/action-junit-report@0a8a5ba57593d67b2e45de2c543b438412382b7b
|
|
if: always() # always run even if the previous step fails
|
|
with:
|
|
report_paths: './**/build/test-results/**/TEST-*.xml'
|
|
|
|
uiTests:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@13f81365a437096ca29f87b1e7389bf0ea1385ed
|
|
|
|
- name: Run tests
|
|
run: ./gradlew allDevicesCheck --no-daemon -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|