Skip to content

parameterized the workflow type #133

parameterized the workflow type

parameterized the workflow type #133

Workflow file for this run

name: Test GitHub Runners
on: push
jobs:
build-and-test:
name: Kotlin Multiplatform Project Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Build Project
run: ./gradlew assemble
- name: Setup Xvfb on screen 0
run: Xvfb :1 -screen 0 1024x768x24 &
- name: Run Desktop Tests
run: ./gradlew composeApp:desktopTest
env:
DISPLAY: :1
- name: Run Android Unit Tests
run: ./gradlew composeApp:testDebugUnitTest
env:
DISPLAY: :1
- name: Enable KVM group perms
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: Run Android Emulator Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
script: ./gradlew connectedAndroidTest
arch: x86_64
- name: Shutdown Xvfb
run: killall Xvfb
- name: Create Test Summary
uses: test-summary/action@v2
with:
paths: '**/*est-results/**/*.xml'
show: "pass, fail, skip"
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: desktop-test-report
path: composeApp/build/reports/tests/desktopTest