ReaderForSelfoss-multiplatform/.gitea/workflows/on_push_testing.yml
aminecmi 896227ed9e
Some checks failed
Check master code / checkout (push) Failing after 26m20s
test: test
2024-12-25 17:23:42 +01:00

76 lines
2.7 KiB
YAML

name: Check master code
on:
push:
branches:
- testing
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags -p
- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: "2.23.3"
- name: run selfoss
run: |
docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/actions/setup-gradle@v3
- 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
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 1800
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: kill -9 $(pgrep -f crashpad_handler) || true
script: echo "Generated AVD snapshot for caching."
- name: ui tests
uses: reactivecircus/android-emulator-runner@v2
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 1800
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: kill -9 $(pgrep -f crashpad_handler) || true
script: adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS && ./gradlew connectedAndroidTest --stacktrace
- 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: always()
run: |
docker compose -f .gitea/workflows/assets/docker-compose.yml stop