Add build artifact in nightly builds #85
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: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build_and_test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --stacktrace | |
- name: Run unit tests and jacoco coverage | |
run: ./gradlew testDebugUnitTest jacocoTestReport --stacktrace | |
- 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: Run connected tests | |
uses: ReactiveCircus/android-emulator-runner@v2 | |
with: | |
api-level: 26 | |
script: | | |
adb logcat & | |
./gradlew connectedCheck --no-parallel | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@v2 | |
with: | |
format: jacoco |