mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
chore: try to setup CI instrumentation tests
This commit is contained in:
@@ -143,9 +143,73 @@ jobs:
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: test-reports
|
||||
name: test-results-unit-tests
|
||||
path: '**/build/reports/tests/'
|
||||
|
||||
instrumentation_test_debug:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 120
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
env:
|
||||
TERM: dumb
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Change Gradle wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Run tests
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: 33
|
||||
arch: arm64-v8a
|
||||
channel: stable
|
||||
target: google_apis
|
||||
profile: pixel_6
|
||||
avd-name: macOs-avd-google_apis-arm64-v8a-33
|
||||
script: ./.tools/run_instrumentation_tests.sh --log-file=logcat.txt --run-affected --affected-base-ref=$BASE_REF
|
||||
env:
|
||||
IDE_INSTRUMENTATION_SETUP_BUILDTOOLS: true
|
||||
ANDROIDIDE_TEST: true
|
||||
IDE_SIGNING_ALIAS: ${{ secrets.IDE_SIGNING_ALIAS }}
|
||||
IDE_SIGNING_AUTH_PASS: ${{ secrets.IDE_SIGNING_AUTH_PASS }}
|
||||
IDE_SIGNING_AUTH_USER: ${{ secrets.IDE_SIGNING_AUTH_USER }}
|
||||
IDE_SIGNING_KEY_PASS: ${{ secrets.IDE_SIGNING_KEY_PASS }}
|
||||
IDE_SIGNING_STORE_PASS: ${{ secrets.IDE_SIGNING_STORE_PASS }}
|
||||
IDE_SIGNING_URL: ${{ secrets.IDE_SIGNING_URL }}
|
||||
IDE_SIGNING_KEY_BIN: ${{ secrets.IDE_SIGNING_KEY_BIN }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: emulator-logs
|
||||
path: logcat.txt
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-results-instrumentation-tests
|
||||
path: |
|
||||
**/build/reports/*
|
||||
**/build/outputs/*/connected/*
|
||||
|
||||
unit_test_tooling_api:
|
||||
name: Build and test Tooling API
|
||||
runs-on: ubuntu-latest
|
||||
@@ -191,7 +255,7 @@ jobs:
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tooling-api-test-reports
|
||||
name: test-results-tooling-api-tests
|
||||
path: '**/build/reports/tests/'
|
||||
|
||||
publish:
|
||||
|
||||
Reference in New Issue
Block a user