Skip to content

Pull Request

Pull Request #51

Workflow file for this run

name: "Pull Request"
run-name: "Pull Request"
on:
pull_request
jobs:
build-app:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
runs-on: "ubuntu-latest"
env:
BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Compile library
run: "./gradlew --parallel assemble :kotlinova-gradle:jar"
- name: Compile Unit Tests
# We cannot run instrumented tests on CI, but at least we can compile them to ensure
# that anvil build passes.
run: "./gradlew --parallel jvmTestClasses compileDebugUnitTestKotlinAndroid compileReleaseUnitTestKotlinAndroid assembleAndroidTest testClasses"
- name: Lint
run: "./gradlew --continue --parallel buildSrc:detekt detektMetadataMain detektJvmMain detektAndroidDebug detektAndroidRelease detektJvmTest :kotlinova-gradle:detektMain lint"
- name: Run Unit Tests
run: "./gradlew test jvmTest"
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
comment_mode: failures
junit_files: |
**/build/outputs/*-results/**/*.xml
**/build/*-results/**/*.xml