Fix regression where changes in OH mode wouldn't update the value #75
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: Android CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
# Needed to get some information about the pull request, if any | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/ | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- 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 tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 28 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew connectedCheck | |
- name: Upload Test Results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test output | |
path: /Users/runner/work/OpeningHoursFragment/OpeningHoursFragment/lib/build/reports/androidTests/connected | |
- name: Generate coverage report | |
run: ./gradlew jacocoTestReport | |
- name: SonarCloud Scan | |
# only do this step if we have a token for sonar | |
if: ${{ env.SONAR_TOKEN }} | |
# note as we don't wait for processing to complete this will always succeed | |
run: ./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=simonpoole-github --info |