Skip to content

Improve AEI capture code quality #1966

Improve AEI capture code quality

Improve AEI capture code quality #1966

name: "Run subset of swazzler-tests"
on:
pull_request:
workflow_dispatch:
env:
ANDROID_BUILD_TOOLS_HOME: "/usr/local/lib/android/sdk/build-tools/35.0.0"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
runSwazzlerTests:
name: "Run Gradle Tests"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Cache NDK
id: ndk-cache
uses: actions/cache@v4
with:
path: /usr/local/lib/android/sdk/ndk/27.0.12077973
key: ndk-cache
- name: Install NDK
if: steps.ndk-cache.outputs.cache-hit != 'true'
run: echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.0.12077973"
# make sure version in gradle.properties matches the version of embrace-swazzler3 version
- name: "Publish SDK locally"
run: ./gradlew publishToMavenLocal --no-daemon
- name: Checkout Swazzler-Test
uses: actions/checkout@v4
with:
repository: embrace-io/swazzler-test
path: ./swazzler-test
submodules: recursive
token: ${{ secrets.GH_ANDROID_SDK_TOKEN || secrets.token }}
- name: Checkout Swazzler
uses: actions/checkout@v4
with:
repository: embrace-io/embrace-swazzler3
path: ./swazzler-test/embrace-swazzler3
token: ${{ secrets.GH_ANDROID_SDK_TOKEN }}
- name: "Publish Swazzler locally"
working-directory: ./swazzler-test/embrace-swazzler3
run: ./gradlew publishToMavenLocal --no-daemon
- name: "Run Gradle Tests"
working-directory: ./swazzler-test
run: ./gradlew :functional-tests:swazzlerTests --tests "io.embrace.android.gradle.swazzler.tests.MinimumSurvivalTests" --stacktrace
- name: "Test Results"
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: swazzler-test-results
path: ./swazzler-test/functional-tests/build/reports/tests/swazzlerTests/