updated comments #1897
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: Tests | |
on: [push, pull_request] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
module: [sdk, messagingpush, messaginginapp, base] | |
name: Unit tests (${{ matrix.module }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-android | |
- name: Run unit tests (${{ matrix.module }}) | |
run: ./gradlew :${{ matrix.module }}:runJacocoTestReport | |
- name: Upload code coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }} # not required for public repos, but sometimes uploads fail without it so include it anyway | |
fail_ci_if_error: true # fail if upload fails so we can catch it and fix it right away. | |
verbose: true | |
files: ./${{ matrix.module }}/build/reports/jacoco/test/jacocoTestReport.xml,./${{ matrix.module }}/build/reports/jacoco/runJacocoTestReport/runJacocoTestReport.xml | |
- name: Publish test results (${{ matrix.module }}) | |
uses: mikepenz/action-junit-report@v4 | |
with: | |
report_paths: '**/build/test-results/test*/TEST-*.xml' | |
fail_on_failure: true | |
require_tests: true | |
if: ${{ always() }} # if running tests fails, we still want to parse the test results | |
instrumentation-test: | |
runs-on: macos-latest | |
timeout-minutes: 45 | |
strategy: | |
# Add more samples here as they are added to the project. | |
matrix: | |
sample: [kotlin_compose, java_layout] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-android | |
- name: Start emulator | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
# Configuration options for the emulator for the best optimization. | |
api-level: 29 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
ram-size: 4096M | |
emulator-boot-timeout: 12000 | |
target: default | |
arch: x86 | |
emulator-build: 7425822 # https://github.com/ReactiveCircus/android-emulator-runner/issues/160 | |
profile: Nexus 6 | |
# Run the instrumentation tests on the emulator. | |
script: ./gradlew :samples:${{ matrix.sample }}:connectedDebugAndroidTest | |
- name: Publish test results | |
uses: mikepenz/action-junit-report@v4 | |
if: always() | |
with: | |
report_paths: 'samples/${{ matrix.sample }}/build/outputs/androidTest-results/connected/TEST-*.xml' |