Skip to content

feat(ci): add zip and enable instrumentation tests #608

feat(ci): add zip and enable instrumentation tests

feat(ci): add zip and enable instrumentation tests #608

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
test:
runs-on: svarog-android-33
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: build & test
run: ./gradlew assemble test jacocoTestReport
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: archive test results
if: failure()
run: (cd adam/build/reports/tests/test; zip -r -X ../../../../../test-result.zip .)
- name: Save test output
uses: actions/upload-artifact@master
if: failure()
with:
name: test-result
path: test-result.zip
- name: archive test coverage
run: (cd adam/build/reports/jacoco/test/html; zip -r -X ../../../../../test-coverage.zip .)
- name: Save coverage output
uses: actions/upload-artifact@master
with:
name: test-coverage
path: test-coverage.zip
- name: codecov unit tests
run: bash <(curl -s https://codecov.io/bash) -f ./adam/build/reports/jacoco/test/jacocoTestReport.xml -F unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration-test:
needs: test
runs-on: svarog-android-${{ matrix.api }}
strategy:
matrix:
api: [ 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34 ]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: integration test
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.4
timeout-minutes: 25
with:
cmd: ./gradlew :adam:integrationTest
cmdOptions: -no-snapshot-save -noaudio -no-boot-anim -cores 2 -memory 3072 -no-window -gpu swiftshader_indirect -grpc 8554
api: ${{ matrix.api }}
tag: google_apis
abi: x86_64
bootTimeout: 1200
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/integrationTest/TEST-*.xml'
- name: Generate integration code coverage report
run: ./gradlew :adam:jacocoIntegrationTestReport
- name: archive integration test results
if: failure()
run: (cd adam/build/reports/tests/integrationTest; zip -r -X ../../../../../integration-test-result.zip .)
- name: Save integration test output
uses: actions/upload-artifact@master
if: failure()
with:
name: integration-test-result
path: integration-test-${{ matrix.api }}-result.zip
- name: archive test coverage
run: (cd adam/build/reports/jacoco/jacocoIntegrationTestReport/html; zip -r -X ../../../../../../integration-test-coverage.zip .)
- name: Save coverage output
uses: actions/upload-artifact@master
with:
name: integration-test-${{ matrix.api }}-coverage
path: integration-test-coverage.zip
- name: Save logcat output
uses: actions/upload-artifact@master
if: failure()
with:
name: logcat-${{ matrix.api }}
path: artifacts/logcat.log
- name: codecov integartion tests
run: bash <(curl -s https://codecov.io/bash) -f ./adam/build/reports/jacoco/jacocoIntegrationTestReport/jacocoIntegrationTestReport.xml -F integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}