Merge pull request #210 from AppDevNext/dependabot/github_actions/gra… #140
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
Build: | |
name: Build | |
runs-on: macOS-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
api: [ 28 ] | |
abi: [ x86_64 ] | |
tag: [ 'default' ] | |
include: | |
# - api: 31 | |
# abi: x86_64 | |
# tag: 'google_apis' | |
- api: 30 | |
abi: x86_64 | |
tag: 'google_apis' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Install Android SDK | |
uses: malinskiy/action-android/install-sdk@release/0.1.4 | |
- name: Build project | |
run: ./gradlew assemble | |
- name: Run instrumentation tests | |
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.4 | |
with: | |
cmd: ./gradlew cAT --continue | |
api: ${{ matrix.api }} | |
tag: ${{ matrix.tag }} | |
abi: ${{ matrix.abi }} | |
cmdOptions: -noaudio -no-boot-anim -no-window | |
- name: Archive Espresso results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Moka-Espresso-${{ matrix.api }}-${{ matrix.abi }}-report | |
path: sample/build/reports/androidTests/connected | |
- name: Archive screenshots | |
if: ${{ always() }} | |
uses: actions/[email protected] | |
with: | |
name: Moka-Screenshots-${{ matrix.api }}-${{ matrix.abi }}-report | |
path: | | |
sample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected | |
sample/build/outputs/androidTest-results/connected | |
Check: | |
name: Check | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Install Android SDK | |
uses: malinskiy/action-android/install-sdk@release/0.1.4 | |
- name: Build project | |
run: ./gradlew check | |
- name: Archive Lint report | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Lint-report | |
path: sample/build/reports/lint-results*.html |