Skip to content

Merge branch 'refs/heads/develop' #3596

Merge branch 'refs/heads/develop'

Merge branch 'refs/heads/develop' #3596

Workflow file for this run

name: Android CI
on:
push:
branches:
- develop
- main
pull_request:
branches:
- '**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }}
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }}
BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }}
BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
jobs:
lint:
name: Spotless check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- name: spotless
run: ./gradlew spotlessCheck --scan
api_check:
name: API check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
- uses: ./.github/actions/setup-java
- name: API check
run: ./gradlew apiCheck --scan
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: |
./gradlew --scan --stacktrace \
assembleDebug
unitTest:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
- name: Run unit tests
run: |
./gradlew :stream-video-android-ui-compose:koverXmlReportDebug --scan --stacktrace
./gradlew :stream-video-android-core:koverXmlReportDebug --scan --stacktrace
- name: Unit tests core results
uses: actions/upload-artifact@v4
with:
name: unit-tests-core-results
path: stream-video-android-core/build/reports/tests/testDebugUnitTest/index.html
- name: Unit tests compose results
uses: actions/upload-artifact@v4
with:
name: unit-tests-compose-results
path: stream-video-android-ui-compose/build/reports/tests/testDebugUnitTest/index.html
- uses: ./.github/actions/setup-ruby
- name: Sonar
run: bundle exec fastlane run_sonar_analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
androidTest-GMD:
name: Android Test with GMD
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
timeout-minutes: 55
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/enable-kvm
# Sets gradle up
- name: Setup Gradle
uses: gradle/[email protected]
# Cleans managed device if previously settle and space currently is not available
- name: Clean Managed Devices
run: ./gradlew cleanManagedDevices --unused-only
- name: Run instrumented tests with GMD
run: ./gradlew pixel2api31DebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=60