Skip to content

fix: exclude self deleting messages from backup #8444

fix: exclude self deleting messages from backup

fix: exclude self deleting messages from backup #8444

name: "Android Tests"
on:
merge_group:
pull_request:
types: [ opened, synchronize ] # Don't rerun on `edited` to save time
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
detekt:
uses: ./.github/workflows/codestyle.yml
gradle-run-tests:
needs: [detekt]
runs-on: buildjet-4vcpu-ubuntu-2204
strategy:
matrix:
api-level: [30]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Gradle Setup
uses: gradle/gradle-build-action@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build the samples
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew :samples:compileDebugSources
# - name: AVD cache
# uses: actions/cache@v3
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-${{ matrix.api-level }}
# - name: Create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/[email protected]
# with:
# api-level: ${{ matrix.api-level }}
# force-avd-creation: false
# target: google_apis
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# cores: 4
# ram-size: 4096M
# heap-size: 2048M
# disable-animations: false
# script: echo "Generated AVD snapshot for caching."
- name: Android Instrumentation Tests
uses: reactivecircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
target: google_apis
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
cores: 4
ram-size: 4096M
heap-size: 2048M
script: ./gradlew connectedAndroidOnlyAffectedTest
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Test Reports
if: always()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: ./**/build/reports/tests/**
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/[email protected]
if: always()
with:
files: |
**/build/test-results/**/*.xml
**/build/outputs/androidTest-results/**/*.xml
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties