Add hypertensionDiagnosedAt and diabetesDiagnosedAt
#17444
This file contains hidden or 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: CI Checks | |
| on: | |
| pull_request: | |
| workflow_call: | |
| inputs: | |
| run-build-checks: | |
| default: true | |
| type: boolean | |
| description: True to run build checks | |
| concurrency: | |
| group: ci-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify_pr_has_story_link: | |
| runs-on: [ ubuntu-latest ] | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Verify PR description | |
| run: .github/scripts/story_link_check.sh '${{ github.event.pull_request.body }}' | |
| verify_changelog_was_updated: | |
| runs-on: [ ubuntu-latest ] | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout master | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: master | |
| path: master | |
| - name: Checkout current | |
| uses: actions/checkout@v5 | |
| with: | |
| path: current | |
| - name: Verify CHANGELOG was updated | |
| run: current/.github/scripts/verify_file_was_changed.sh master/CHANGELOG.md current/CHANGELOG.md | |
| lint: | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: QA Lint | |
| run: ./gradlew --build-cache --no-daemon lint | |
| unit_tests: | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Unit Tests | |
| run: | | |
| ./gradlew --build-cache --no-daemon test -x :app:test; | |
| ./gradlew --build-cache --no-daemon testQaDebugUnitTest; | |
| integration_tests: | |
| runs-on: [ ubuntu-latest ] | |
| env: | |
| AVD_API_LEVEL: 34 | |
| AVD_ARCH: x86_64 | |
| steps: | |
| - 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: Checkout Android source | |
| uses: actions/checkout@v5 | |
| - name: Start Simple Docker server | |
| run: | | |
| .github/scripts/deploy_docker_server.sh | |
| echo "CONTAINER_ID=$(docker container ls -q -f name=simple-server)" >> $GITHUB_ENV | |
| - name: Cache AVD | |
| uses: actions/cache@v4 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: ${{ runner.os }}-avd-${{ env.AVD_API_LEVEL }}-${{ env.AVD_ARCH }} | |
| - name: create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.AVD_API_LEVEL }} | |
| arch: ${{ env.AVD_ARCH }} | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: false | |
| disk-size: 8G | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| cache: 'gradle' | |
| - name: Create build directory | |
| run: mkdir app/build | |
| - name: Build QA Test Artifacts | |
| id: build-instrumented-tests | |
| run: | | |
| ./gradlew --build-cache --no-daemon -PmanifestEndpoint=http://10.0.2.2:3000/api/ assembleQaDebug assembleQaDebugAndroidTest | |
| - name: Android Tests | |
| id: run-instrumented-tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.AVD_API_LEVEL }} | |
| arch: ${{ env.AVD_ARCH }} | |
| force-avd-creation: false | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| disk-size: 8G | |
| script: | | |
| adb root | |
| mkdir -p app/build/outputs/test-artifacts | |
| adb install app/build/outputs/apk/qa/debug/app-qa-debug.apk | |
| adb install app/build/outputs/apk/androidTest/qa/debug/app-qa-debug-androidTest.apk | |
| adb shell am instrument -w -e filter org.simple.clinic.benchmark.SelectBenchmarkTests -e benchmark_app_performance false org.simple.clinic.qa.debug.test/org.simple.clinic.AndroidTestJUnitRunner >app/build/outputs/test-artifacts/logs.txt 2>app/build/outputs/test-artifacts/logs.txt | |
| cat app/build/outputs/test-artifacts/logs.txt | |
| adb pull /storage/emulated/0/Android/data/org.simple.clinic.qa.debug/ app/build/outputs/test-artifacts/ || true | |
| adb uninstall org.simple.clinic.qa.debug | |
| adb uninstall org.simple.clinic.qa.debug.test | |
| ! grep -q "FAILURES\!\!\!" app/build/outputs/test-artifacts/logs.txt | |
| - name: Upload failed test artifacts | |
| if: always() && steps.run-instrumented-tests.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: failed-test-artifacts | |
| path: app/build/outputs/test-artifacts | |
| - name: Extract Docker logs | |
| if: always() | |
| run: | | |
| docker cp ${{ env.CONTAINER_ID }}:/home/app/log ./docker_logs | |
| zip -r docker_logs.zip docker_logs/ | |
| - name: Upload Docker logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docker-logs | |
| path: docker_logs.zip | |
| - name: Stop Simple Docker server | |
| run: | | |
| docker compose -f ".github/docker/simple-server.compose.yml" down | |
| verify_room_schemas: | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - name: Checkout master | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: master | |
| path: master | |
| - name: Checkout current | |
| uses: actions/checkout@v5 | |
| with: | |
| path: current | |
| - name: Verify existing Room schemas are not modified | |
| run: current/.github/scripts/compare_directory_contents.sh master/app/schemas/org.simple.clinic.AppDatabase current/app/schemas/org.simple.clinic.AppDatabase | |
| fix_strings_ellipsise: | |
| runs-on: [ ubuntu-latest ] | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{github.event.pull_request.head.ref}} | |
| fetch-depth: 0 | |
| token: ${{ secrets.SERVICES_ACCESS_TOKEN }} | |
| - name: Fix ellipsise in strings | |
| run: .github/scripts/strings_reader.py | |
| - name: Commit and push | |
| env: | |
| USER_NAME: ${{ secrets.USER_NAME }} | |
| USER_EMAIL: ${{ secrets.USER_EMAIL }} | |
| run: .github/scripts/commit_and_push_string_fixes.sh |