# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions # Renaming ? Change the README badge. name: Build on: push: branches: - mayowa/build-premise-cameraview-artifact pull_request: jobs: ANDROID_BASE_CHECKS: name: Base Checks runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: java-version: 11 distribution: temurin cache: gradle - name: Perform base checks run: ./gradlew assembleRelease --stacktrace ANDROID_UNIT_TESTS: name: Unit Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: java-version: 11 distribution: temurin cache: gradle - name: Execute unit tests run: ./gradlew cameraview:runUnitTests --stacktrace ANDROID_EMULATOR_TESTS: name: Emulator Tests runs-on: macos-latest strategy: fail-fast: false matrix: # TODO 29 fails due to Mockito issues, probably reproducible locally # 22-28 work (some of them, with SdkExclude restrictions) EMULATOR_API: [22, 23, 24] include: - EMULATOR_API: 24 EMULATOR_ARCH: x86 - EMULATOR_API: 23 EMULATOR_ARCH: x86 - EMULATOR_API: 22 EMULATOR_ARCH: x86 steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: java-version: 11 distribution: temurin cache: gradle - name: Execute emulator tests timeout-minutes: 30 uses: reactivecircus/android-emulator-runner@v2.21.0 with: api-level: ${{ matrix.EMULATOR_API }} arch: ${{ matrix.EMULATOR_ARCH }} disable-animations: true profile: Nexus 5X emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect script: ./.github/workflows/emulator_script.sh MAVEN_UPLOAD: name: Maven Upload runs-on: ubuntu-latest needs: [ANDROID_UNIT_TESTS, ANDROID_EMULATOR_TESTS, ANDROID_BASE_CHECKS] env: ARTIFACTORY_URL: https://premise.jfrog.io/premise ARTIFACTORY_USERNAME: bot-travis-ci ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: java-version: 11 distribution: temurin cache: gradle - name: Perform maven upload run: ./gradlew artifactoryPublish