mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-09-06 18:01:11 +00:00
Use large runners for CI Android tests (#306)
This commit is contained in:
parent
133d155b94
commit
e2bfda71bc
3
.github/workflows/codeql.yml
vendored
3
.github/workflows/codeql.yml
vendored
|
@ -48,8 +48,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 11
|
java-version: 11
|
||||||
cache: 'gradle'
|
- uses: gradle/gradle-build-action@v2
|
||||||
- uses: gradle/wrapper-validation-action@v1
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -17,12 +17,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
cache: gradle
|
- uses: gradle/gradle-build-action@v2
|
||||||
- uses: gradle/wrapper-validation-action@v1
|
|
||||||
|
|
||||||
- name: Prepare keystore
|
- name: Prepare keystore
|
||||||
run: echo ${{ secrets.android_keystore_base64 }} | base64 -d >$GITHUB_WORKSPACE/keystore.jks
|
run: echo ${{ secrets.android_keystore_base64 }} | base64 -d >$GITHUB_WORKSPACE/keystore.jks
|
||||||
|
|
||||||
- name: Build signed package
|
- name: Build signed package
|
||||||
run: ./gradlew --no-daemon app:assembleRelease
|
run: ./gradlew --no-daemon app:assembleRelease
|
||||||
env:
|
env:
|
||||||
|
|
51
.github/workflows/test-dev.yml
vendored
51
.github/workflows/test-dev.yml
vendored
|
@ -26,13 +26,10 @@ jobs:
|
||||||
|
|
||||||
test_on_emulator:
|
test_on_emulator:
|
||||||
name: Tests with emulator
|
name: Tests with emulator
|
||||||
runs-on: privileged
|
runs-on: ubuntu-latest-4-cores
|
||||||
container:
|
strategy:
|
||||||
image: ghcr.io/bitfireat/docker-android-ci:main
|
matrix:
|
||||||
options: --privileged
|
api-level: [ 31 ]
|
||||||
env:
|
|
||||||
ANDROID_HOME: /sdk
|
|
||||||
ANDROID_AVD_HOME: /root/.android/avd
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -43,10 +40,42 @@ jobs:
|
||||||
java-version: 11
|
java-version: 11
|
||||||
- uses: gradle/gradle-build-action@v2
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
|
||||||
- name: Start emulator
|
- name: Enable KVM group perms
|
||||||
run: start-emulator.sh
|
run: |
|
||||||
- name: Run connected tests
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
run: ./gradlew --no-daemon app:connectedCheck
|
sudo udevadm control --reload-rules
|
||||||
|
sudo udevadm trigger --name-match=kvm
|
||||||
|
|
||||||
|
- name: Cache AVD and APKs
|
||||||
|
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/android-emulator-runner@v2
|
||||||
|
with:
|
||||||
|
api-level: ${{ matrix.api-level }}
|
||||||
|
arch: x86_64
|
||||||
|
force-avd-creation: false
|
||||||
|
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||||
|
disable-animations: false
|
||||||
|
script: echo "Generated AVD snapshot for caching."
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
|
with:
|
||||||
|
api-level: ${{ matrix.api-level }}
|
||||||
|
arch: x86_64
|
||||||
|
force-avd-creation: false
|
||||||
|
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||||
|
disable-animations: true
|
||||||
|
script: ./gradlew --no-daemon app:connectedCheck
|
||||||
|
|
||||||
- name: Archive results
|
- name: Archive results
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
|
|
@ -16,7 +16,7 @@ import java.net.InetAddress
|
||||||
|
|
||||||
class Android10ResolverTest {
|
class Android10ResolverTest {
|
||||||
|
|
||||||
val FQDN_DAVX5 = "www.google.com"
|
val FQDN_DAVX5 = "www.davx5.com"
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
|
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
|
||||||
|
|
Loading…
Reference in a new issue