parent
129b43e657
commit
02d2c2fdba
@ -0,0 +1,17 @@ |
||||
coverage: |
||||
precision: 1 |
||||
round: down |
||||
range: "30...70" |
||||
|
||||
status: |
||||
project: |
||||
default: |
||||
target: 40% |
||||
patch: |
||||
default: |
||||
target: 70% |
||||
changes: no |
||||
|
||||
comment: |
||||
# diff, changes, footer, reach, flags, suggestions |
||||
layout: "header, files" |
@ -0,0 +1,72 @@ |
||||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions |
||||
name: Android Build |
||||
on: [push, pull_request] |
||||
env: |
||||
- ANDROID_UNIT_TESTS_PATH: ./cameraview/build/jacoco/ |
||||
- ANDROID_EMULATOR_TESTS_PATH: ./cameraview/build/outputs/code_coverage/debugAndroidTest/connected |
||||
jobs: |
||||
ANDROID_BASE_CHECKS: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
with: fetch-depth: 1 |
||||
- uses: actions/setup-java@v1 |
||||
with: java-version: 1.8 |
||||
- run: ./gradlew demo:assembleDebug cameraview:javadoc |
||||
ANDROID_UNIT_TESTS: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
with: fetch-depth: 1 |
||||
- uses: actions/setup-java@v1 |
||||
with: java-version: 1.8 |
||||
- run: ./gradlew cameraview:testDebugUnitTest |
||||
- uses: actions/upload-artifact@v1 |
||||
with: |
||||
name: unit_tests |
||||
path: $ANDROID_UNIT_TESTS_PATH |
||||
ANDROID_EMULATOR_TESTS: |
||||
runs-on: macOS-latest |
||||
strategy: |
||||
matrix: |
||||
EMULATOR_API: [22] |
||||
EMULATOR_ARCH: [x86_64] |
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
with: fetch-depth: 1 |
||||
- uses: actions/setup-java@v1 |
||||
with: java-version: 1.8 |
||||
- uses: reactivecircus/android-emulator-runner@v1 |
||||
with: |
||||
api-level: ${{ matrix.EMULATOR_API }} |
||||
arch: ${{ matrix.EMULATOR_ARCH }} |
||||
disable-animations: true |
||||
headless: true |
||||
script: ./gradlew cameraview:connectedCheck |
||||
- uses: actions/upload-artifact@v1 |
||||
with: |
||||
name: emulator_tests |
||||
path: $ANDROID_EMULATOR_TESTS_PATH |
||||
CODE_COVERAGE: |
||||
runs-on: ubuntu-latest |
||||
needs: [ANDROID_UNIT_TESTS, ANDROID_EMULATOR_TESTS] |
||||
steps: |
||||
- uses: actions/checkout@v1 |
||||
with: fetch-depth: 1 |
||||
- uses: actions/setup-java@v1 |
||||
with: java-version: 1.8 |
||||
- uses: actions/download-artifact@v1 |
||||
with: |
||||
name: unit_tests |
||||
path: $ANDROID_UNIT_TESTS_PATH |
||||
- uses: actions/download-artifact@v1 |
||||
with: |
||||
name: emulator_tests |
||||
path: ANDROID_EMULATOR_TESTS_PATH |
||||
- run: ./gradlew cameraview:mergedCoverageReport |
||||
- uses: codecov/codecov-action@v1 |
||||
with: |
||||
token: ${{ secrets.CODECOV_KEY }} |
||||
file: ./cameraview/build/reports/mergedCoverageReport |
||||
yml: ./.github/codecov.yml |
||||
fail_ci_if_error: true |
@ -0,0 +1,15 @@ |
||||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions |
||||
name: Android Deploy |
||||
on: [release] |
||||
jobs: |
||||
BINTRAY_UPLOAD: |
||||
runs-on: ubuntu-latest |
||||
env: |
||||
- TRAVIS: true |
||||
- BINTRAY_USER: ${{ secrets.BINTRAY_USER }} |
||||
- BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} |
||||
- uses: actions/checkout@v1 |
||||
with: fetch-depth: 1 |
||||
- uses: actions/setup-java@v1 |
||||
with: java-version: 1.8 |
||||
- run: ./gradlew bintrayUpload |
Loading…
Reference in new issue