test: test
Some checks are pending
Check master code / checkout (push) Waiting to run

This commit is contained in:
aminecmi
2024-12-22 21:05:47 +01:00
parent 6fb7c4a073
commit 5ff0c42fcc
20 changed files with 1203 additions and 104 deletions

View File

@ -19,6 +19,6 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Configure gradle...
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true" >> ~/.gradle/gradle.properties
- name: Build and test
run: ./gradlew build --stacktrace
run: ./gradlew build --stacktrace

View File

@ -10,10 +10,10 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Fetch tags
# run: git fetch --tags -p
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags -p
- name: Init compose
uses: KengoTODA/actions-setup-docker-compose@v1
with:
@ -21,20 +21,57 @@ jobs:
- name: run selfoss
run: |
docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
response=$(curl 172.17.0.1:8888/api/about)
echo $response
# - uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: '17'
# - name: Setup Android SDK
# uses: android-actions/setup-android@v3
# - name: Configure gradle...
# run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
# - name: Build and test
# run: ./gradlew build --stacktrace
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Configure gradle...
run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true" >> ~/.gradle/gradle.properties
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: emulator-33
- 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: 33
arch: x86_64
force-avd-creation: false
emulator-boot-timeout: 1800
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
pre-emulator-launch-script: killall -INT crashpad_handler || true
script: echo "Generated AVD snapshot for caching."
- name: ui tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
arch: x86_64
force-avd-creation: false
emulator-boot-timeout: 1800
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
pre-emulator-launch-script: killall -INT crashpad_handler || true
script: adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS && ./gradlew connectedAndroidTest -Dci=true
- name: Artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: ui-tests
path: androidApp/build/outputs/androidTest-results/connected/debug/flavors/githubConfig
retention-days: 1
overwrite: true
include-hidden-files: true
- name: Clean
if: success() || failure()
if: always()
run: |
docker compose -f .gitea/workflows/assets/docker-compose.yml stop
docker compose -f .gitea/workflows/assets/docker-compose.yml stop