From 24aef2604a73c233b64675b539603aa2ddd12ab5 Mon Sep 17 00:00:00 2001 From: ci-bot Date: Mon, 24 Nov 2025 15:01:25 +0000 Subject: [PATCH] Update .gitea/workflows/workflow.yml --- .gitea/workflows/workflow.yml | 52 +++-------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/.gitea/workflows/workflow.yml b/.gitea/workflows/workflow.yml index be6533d..aefb752 100644 --- a/.gitea/workflows/workflow.yml +++ b/.gitea/workflows/workflow.yml @@ -6,30 +6,8 @@ on: jobs: validate-and-test: - runs-on: android + runs-on: generic steps: - - name: Check ANDROID_SERIAL is set - run: | - if [ -z "$ANDROID_SERIAL" ]; then - echo "❌ Ошибка: Переменная окружения ANDROID_SERIAL не установлена." - exit 1 - fi - echo "✅ Переменная ANDROID_SERIAL установлена: $ANDROID_SERIAL" - - - name: Check ADB device is connected - run: | - command -v adb >/dev/null 2>&1 || { echo "❌ Ошибка: adb не найден в PATH." >&2; exit 1; } - - connected_devices=$(adb devices | grep -c "$ANDROID_SERIAL.*device$") - - if [ "$connected_devices" -ne 1 ]; then - echo "❌ Ошибка: Устройство с серийным номером $ANDROID_SERIAL не подключено или не доступно." - echo "Доступные устройства:" - adb devices - exit 1 - fi - echo "✅ Устройство с серийным номером $ANDROID_SERIAL подключено и готово к использованию." - - name: Checkout PR code uses: actions/checkout@v4 with: @@ -45,38 +23,16 @@ jobs: GITEA_HEAD_REF: ${{ gitea.event.pull_request.head.ref }} - name: Checkout tests - run: python3 /opt/scripts/copy-tests.py --repo-url "Olympic/NTO-2025-Android-TeamTask-tests" --branch "main" - - - name: Uninstall APK before tests (Gradle) - run: | - chmod +x ./gradlew - ./gradlew uninstallAll + run: python3 /opt/scripts/copy-tests.py --repo-url "Olympic/NTO-2025-Android-TeamTask-tests" --branch "main" --task-type "spring" - name: Run tests - run: | - chmod +x ./gradlew - ./gradlew connectedDebugAndroidTest - - - name: Uninstall APK after tests (Gradle) - run: | - chmod +x ./gradlew - ./gradlew uninstallAll - if: always() + run: mvn test - name: Upload test results uses: christopherHX/gitea-upload-artifact@v4 with: name: test-results - path: app/build/outputs/androidTest-results/connected - if-no-files-found: ignore - retention-days: 30 - if: always() - - - name: Upload test reports - uses: christopherHX/gitea-upload-artifact@v4 - with: - name: test-reports - path: app/build/reports/androidTests/connected + path: target/surefire-reports if-no-files-found: ignore retention-days: 30 if: always() \ No newline at end of file