Merge pull request #764 from AppDevNext/dependabot/github_actions/act… #1839
This file contains hidden or 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
| # https://github.com/uber/AutoDispose/blob/master/.github/workflows/ci.yml | |
| name: Build and Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| BuildTest: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-22.04 ] | |
| api: [ 34 ] | |
| abi: [ x86_64 ] | |
| tag: [ 'default' ] | |
| java_version: [ 17 ] | |
| # include: | |
| # - java_version: 17 | |
| # os: macOS-14 | |
| # api: 31 | |
| # abi: arm64-v8a | |
| # tag: 'google_apis' | |
| steps: | |
| - name: Show architecture | |
| run: uname -a | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Install JDK ${{ matrix.java_version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'adopt' | |
| java-version: ${{ matrix.java_version }} | |
| - name: kvm support | |
| run: | | |
| egrep -c '(vmx|svm)' /proc/cpuinfo | |
| id | |
| sudo adduser $USER kvm | |
| sudo chown -R $USER /dev/kvm | |
| id | |
| - name: prepare | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y exiftool imagemagick xdg-utils libimage-exiftool-perl zsh jq xorg | |
| # brew install exiftool imagemagick | |
| - uses: gradle/actions/wrapper-validation@v5 | |
| - name: Install Android SDK | |
| uses: hannesa2/action-android/install-sdk@0.1.16.7 | |
| - name: Decrypt keystore | |
| run: ./signing/decrypt.sh | |
| env: | |
| CRYPT_PASS: ${{ secrets.CRYPT_PASS }} | |
| - name: Run instrumentation tests | |
| uses: hannesa2/action-android/emulator-run-cmd@0.1.16.7 | |
| with: | |
| cmd: ./gradlew cAT --continue | |
| api: ${{ matrix.api }} | |
| tag: ${{ matrix.tag }} | |
| abi: ${{ matrix.abi }} | |
| cmdOptions: -noaudio -no-boot-anim -no-window -metrics-collection | |
| bootTimeout: 720 # seconds = 12 minutes | |
| - name: Archive Espresso results | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ always() }} | |
| with: | |
| name: Logcat-Espresso-report | |
| path: app/build/reports/androidTests/connected | |
| - name: Archive screenshots | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Logcat-Screenshots | |
| path: | | |
| app/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected | |
| app/build/outputs/androidTest-results/connected | |
| - name: cleanup | |
| run: ./signing/cleanup.sh | |
| Check: | |
| name: Check | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| java_version: [ 17 ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Install JDK ${{ matrix.java_version }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'adopt' | |
| java-version: ${{ matrix.java_version }} | |
| - name: gradle check | |
| run: ./gradlew check | |
| - name: Archive Lint report | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ always() }} | |
| with: | |
| name: Logcat-Lint-report | |
| path: ./**/build/reports/lint-results*.html |