[MOB-10109] updates merge tests #1883
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: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2 | |
- name: Configure JDK | |
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3 | |
with: | |
java-version: 11 | |
- run: touch local.properties | |
- name: Checkstyle | |
run: ./gradlew :iterableapi:checkstyle :iterableapi-ui:assembleDebug | |
- name: Javadoc Check | |
run: ./gradlew :iterableapi:javadoc :iterableapi-ui:javadoc | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2 | |
- name: Configure JDK | |
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3 | |
with: | |
java-version: 11 | |
- run: touch local.properties | |
- name: Test | |
run: ./gradlew :iterableapi:jacocoTestDebugUnitTestReport :app:jacocoDebugTestReport | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: unit-tests | |
path: | | |
./**/build/**/jacoco*.xml | |
./**/build/**/report.xml | |
instrumentation-tests: | |
name: Instrumentation tests | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@216d1ad2b3710bf005dc39237337b9673fd8fcd5 # v3.3.2 | |
- name: Configure JDK | |
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3 | |
with: | |
java-version: 11 | |
- run: touch local.properties | |
- name: Test | |
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1 | |
with: | |
api-level: 28 | |
script: ./gradlew :iterableapi:connectedCheck :app:jacocoDebugAndroidTestReport | |
- name: Upload coverage data | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: instrumentation-tests | |
path: | | |
./**/build/**/jacoco*.xml | |
./**/build/**/report.xml | |
report-coverage: | |
name: Report coverage | |
runs-on: ubuntu-latest | |
needs: [unit-tests, instrumentation-tests] | |
env: | |
JACOCO_SOURCE_PATH: "iterableapi/src/main/java iterableapi-ui/src/main/java" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Configure JDK | |
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3 | |
with: | |
java-version: 11 | |
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
- run: chmod +x ./cc-test-reporter | |
- run: ./cc-test-reporter before-build | |
- name: Download unit tests coverage | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: unit-tests | |
- name: Download instrumentation tests coverage | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
name: instrumentation-tests | |
- run: bash <(curl -s https://codecov.io/bash) | |
- run: ./cc-test-reporter format-coverage app/build/reports/jacoco/jacocoDebugTestReport/jacocoDebugTestReport.xml --input-type jacoco -d | |
- run: ./cc-test-reporter format-coverage iterableapi/build/reports/coverage/androidTest/debug/connected/report.xml --input-type jacoco -d | |
- run: ./cc-test-reporter format-coverage iterableapi/build/jacoco/jacoco.xml --input-type jacoco -d | |
- run: ./cc-test-reporter format-coverage app/build/reports/jacoco/jacocoDebugAndroidTestReport/jacocoDebugAndroidTestReport.xml --input-type jacoco -d | |
- run: ./cc-test-reporter upload-coverage | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |