mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-05 05:56:38 +08:00
Fix unit test
This commit is contained in:
parent
e77256ed6d
commit
96eca090f7
54
.github/workflows/build.yml
vendored
54
.github/workflows/build.yml
vendored
@ -2,6 +2,7 @@ name: Build
|
|||||||
|
|
||||||
on: [ push, pull_request ]
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build on ${{ matrix.os }}
|
name: Build on ${{ matrix.os }}
|
||||||
@ -33,12 +34,48 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
needs: build
|
needs: build
|
||||||
name: Test on API ${{ matrix.api-level }}
|
name: Test on API ${{ matrix.api-level }} ${{ matrix.arch }}
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
api-level: [ 26, 27, 28, 29, 30, 31, 32 ]
|
include:
|
||||||
|
- api-level: 26
|
||||||
|
target: default
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 26
|
||||||
|
target: default
|
||||||
|
arch: x86
|
||||||
|
- api-level: 27
|
||||||
|
target: default
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 27
|
||||||
|
target: default
|
||||||
|
arch: x86
|
||||||
|
- api-level: 28
|
||||||
|
target: default
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 28
|
||||||
|
target: default
|
||||||
|
arch: x86
|
||||||
|
- api-level: 29
|
||||||
|
target: default
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 29
|
||||||
|
target: default
|
||||||
|
arch: x86
|
||||||
|
- api-level: 30
|
||||||
|
target: default
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 30
|
||||||
|
target: google_apis
|
||||||
|
arch: x86
|
||||||
|
- api-level: 31
|
||||||
|
target: google_apis
|
||||||
|
arch: x86_64
|
||||||
|
- api-level: 32
|
||||||
|
target: google_apis
|
||||||
|
arch: x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -55,14 +92,14 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/.android/avd/*
|
~/.android/avd/*
|
||||||
~/.android/adb*
|
~/.android/adb*
|
||||||
key: avd-${{ matrix.api-level }}
|
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}
|
||||||
- name: create AVD and generate snapshot for caching
|
- name: create AVD and generate snapshot for caching
|
||||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
with:
|
with:
|
||||||
api-level: ${{ matrix.api-level }}
|
api-level: ${{ matrix.api-level }}
|
||||||
arch: x86_64
|
arch: ${{ matrix.arch }}
|
||||||
target: google_apis
|
target: ${{ matrix.target }}
|
||||||
script: echo "Generated AVD snapshot for caching."
|
script: echo "Generated AVD snapshot for caching."
|
||||||
force-avd-creation: false
|
force-avd-creation: false
|
||||||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||||
@ -71,13 +108,14 @@ jobs:
|
|||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
with:
|
with:
|
||||||
api-level: ${{ matrix.api-level }}
|
api-level: ${{ matrix.api-level }}
|
||||||
arch: x86_64
|
arch: ${{ matrix.arch }}
|
||||||
target: google_apis
|
target: ${{ matrix.target }}
|
||||||
script: ./gradlew :test:connectedCheck; ./gradlew :test:connectedCheck
|
script: ./gradlew :lsplant:prefabDebugConfigurePackage; ./gradlew :test:connectedCheck
|
||||||
force-avd-creation: false
|
force-avd-creation: false
|
||||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||||
disable-animations: true
|
disable-animations: true
|
||||||
- name: Upload outputs
|
- name: Upload outputs
|
||||||
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: test-outputs
|
name: test-outputs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user