Migrate style, ui and screen modules in KMP #185
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
android: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/actions/setup-gradle@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Check Kotlin lint | |
run: ./gradlew ktlintCheck detekt --stacktrace | |
- name: Check lint | |
run: ./gradlew lintDebug --stacktrace | |
- name: Check and build android project | |
run: ./gradlew :androidApp:assembleDebug :androidApp:bundleDebug --stacktrace | |
- name: Upload build outputs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-build-outputs | |
path: androidApp/build/outputs | |
- name: Upload reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-reports | |
path: | | |
**/build/reports/* | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-test-results | |
path: | | |
**/build/test-results/* | |
androidTest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/actions/setup-gradle@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Enable KVM | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Build projects and run instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
emulator-build: 7425822 # https://github.com/ReactiveCircus/android-emulator-runner/issues/160 | |
script: ./gradlew connectedDebugAndroidTest --daemon | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-instrumented-test-results | |
path: | | |
**/build/reports/androidTests | |
backend: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/actions/setup-gradle@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Check Kotlin lint | |
run: ./gradlew :backend:ktlintCheck :backend:detekt --stacktrace | |
- name: Check and build android project | |
run: ./gradlew :backend:build --stacktrace |