Skip to content

Update libraries

Update libraries #6

Workflow file for this run

name: Build_1.x
on:
push:
branches:
- 1.x
pull_request:
workflow_dispatch:
env:
MAIN_BRANCH: ${{ github.ref == 'refs/heads/1.x' || github.ref == 'refs/heads/2.x' }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Build
run: >
./gradlew
build
projectHealth
mergeLintSarif
mergeDetektSarif
:plugins:buildPlugins
--continue
- name: Check publication setup
run: >
./gradlew
publishAppyxReleasePublicationToOSSRHRepository
publishAppyxReleasePublicationToSonatypeSnapshotRepository
--dry-run
--no-parallel
- name: Deploy snapshot
if: env.MAIN_BRANCH == 'true' && github.repository == 'bumble-tech/appyx'
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: >
./gradlew
publishAppyxReleasePublicationToSonatypeSnapshotRepository
-Psnapshot=true
--no-parallel
-Psigning.password=${{ secrets.SIGNING_PASSWORD }}
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }}
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }}
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: build/lint-merged.sarif
category: lint
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: build/detekt-merged.sarif
category: detekt
- name: Upload failure artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: reports
path: |
**/build/reports/
!**/build/reports/dependency-analysis/
instrumentation-tests:
name: Instrumentation tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Pre build sources before launching emulator
run: ./gradlew compileDebugAndroidTestSources
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-28
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
# Use API 28 https://github.com/ReactiveCircus/android-emulator-runner/issues/373
api-level: 28
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
# Use API 28 https://github.com/ReactiveCircus/android-emulator-runner/issues/373
api-level: 28
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
adb shell pm list packages -3 | cut -f 2 -d ":" | while read package; do if [ "$package" = "com.bumble.appyx.sample.navigation.compose.test" ] || [ "$package" = "com.bumble.appyx.core.test" ] || [ "$package" = "com.bumble.appyx.interop.ribs.test" ] || [ "$package" = "com.bumble.appyx.sample.navigtion.compose.test" ]; then adb uninstall $package; fi; done
adb logcat > logcat.out &
./gradlew connectedCheck
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v2
with:
name: instrumentation-failures
path: |
**/build/reports
logcat.out