2024-12-21 20:02:56 +00:00
|
|
|
name: Check master code
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- testing
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
checkout:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-22 20:05:47 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Fetch tags
|
|
|
|
run: git fetch --tags -p
|
|
|
|
- uses: KengoTODA/actions-setup-docker-compose@v1
|
2024-12-21 20:02:56 +00:00
|
|
|
with:
|
|
|
|
version: "2.23.3"
|
|
|
|
- name: run selfoss
|
|
|
|
run: |
|
|
|
|
docker compose -f .gitea/workflows/assets/docker-compose.yml up -d
|
2024-12-22 20:05:47 +00:00
|
|
|
- uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '17'
|
|
|
|
cache: gradle
|
|
|
|
- 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: ui tests
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
2024-12-21 20:02:56 +00:00
|
|
|
if: success() || failure()
|
2024-12-22 20:05:47 +00:00
|
|
|
env:
|
|
|
|
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 1800
|
|
|
|
with:
|
|
|
|
api-level: 25
|
|
|
|
force-avd-creation: false
|
|
|
|
emulator-boot-timeout: 1800
|
|
|
|
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-metrics -camera-back none
|
|
|
|
disable-animations: true
|
|
|
|
script: ./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()
|
2024-12-21 20:02:56 +00:00
|
|
|
run: |
|
2024-12-22 20:05:47 +00:00
|
|
|
docker compose -f .gitea/workflows/assets/docker-compose.yml stop
|